Skip to content

Commit

Permalink
Rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Sep 29, 2021
1 parent 9e5201d commit 53ec12d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 16 deletions.
12 changes: 3 additions & 9 deletions cranelift/codegen/meta/src/cdsl/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ pub(crate) struct InstructionGroupBuilder<'all_inst> {

impl<'all_inst> InstructionGroupBuilder<'all_inst> {
pub fn new(all_instructions: &'all_inst mut AllInstructions) -> Self {
Self {
all_instructions,
}
Self { all_instructions }
}

pub fn push(&mut self, builder: InstructionBuilder) {
Expand Down Expand Up @@ -449,13 +447,9 @@ impl Bindable for BoundInstruction {
fn bind(&self, parameter: impl Into<BindParameter>) -> BoundInstruction {
let mut modified = self.clone();
match parameter.into() {
BindParameter::Lane(lane_type) => modified
.value_types
.push(lane_type.into()),
BindParameter::Lane(lane_type) => modified.value_types.push(lane_type.into()),
BindParameter::Reference(reference_type) => {
modified
.value_types
.push(reference_type.into());
modified.value_types.push(reference_type.into());
}
}
modified.verify_bindings().unwrap();
Expand Down
1 change: 0 additions & 1 deletion cranelift/codegen/meta/src/cdsl/typevar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,6 @@ fn test_forward_images() {
);
}


#[test]
#[should_panic]
fn test_typeset_singleton_panic_nonsingleton_types() {
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/meta/src/shared/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub mod settings;
pub mod types;

use crate::cdsl::formats::{FormatStructure, InstructionFormat};
use crate::cdsl::instructions::{AllInstructions};
use crate::cdsl::instructions::AllInstructions;
use crate::cdsl::settings::SettingGroup;

use crate::shared::entities::EntityRefs;
Expand Down
4 changes: 1 addition & 3 deletions cranelift/codegen/src/machinst/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
use crate::binemit;
use crate::ir;
use crate::isa::{
EncInfo, Encoding, Encodings, Legalize, RegClass, RegInfo, TargetIsa,
};
use crate::isa::{EncInfo, Encoding, Encodings, Legalize, RegClass, RegInfo, TargetIsa};
use crate::machinst::*;
use crate::regalloc::RegisterSet;
use crate::settings::{self, Flags};
Expand Down
4 changes: 2 additions & 2 deletions cranelift/filetests/src/function_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ impl SingleFunctionCompiler {

/// Build a [SingleFunctionCompiler] using the host machine's ISA and the passed flags.
pub fn with_host_isa(flags: settings::Flags) -> Self {
let builder = builder_with_options(true)
.expect("Unable to build a TargetIsa for the current host");
let builder =
builder_with_options(true).expect("Unable to build a TargetIsa for the current host");
let isa = builder.finish(flags);
Self::new(isa)
}
Expand Down

0 comments on commit 53ec12d

Please sign in to comment.