diff --git a/cranelift/src/libcretonne/dominator_tree.rs b/cranelift/src/libcretonne/dominator_tree.rs index 1b99db342d..a3a00b2cc4 100644 --- a/cranelift/src/libcretonne/dominator_tree.rs +++ b/cranelift/src/libcretonne/dominator_tree.rs @@ -108,11 +108,7 @@ impl DominatorTree { // TODO: we can't rely on instruction numbers to always be ordered // from lowest to highest. Given that, it will be necessary to create // an abolute mapping to determine the instruction order in the future. - if a.1 == NO_INST || a.1 < b.1 { - a - } else { - b - } + if a.1 == NO_INST || a.1 < b.1 { a } else { b } } /// Returns the immediate dominator of some ebb or None if the diff --git a/cranelift/src/libcretonne/ir/entities.rs b/cranelift/src/libcretonne/ir/entities.rs index 33b41e5273..1a887452a7 100644 --- a/cranelift/src/libcretonne/ir/entities.rs +++ b/cranelift/src/libcretonne/ir/entities.rs @@ -42,11 +42,7 @@ impl EntityRef for Ebb { impl Ebb { /// Create a new EBB reference from its number. This corresponds to the ebbNN representation. pub fn with_number(n: u32) -> Option { - if n < u32::MAX { - Some(Ebb(n)) - } else { - None - } + if n < u32::MAX { Some(Ebb(n)) } else { None } } } diff --git a/cranelift/src/libcretonne/ir/immediates.rs b/cranelift/src/libcretonne/ir/immediates.rs index 87433606d7..99276bfd66 100644 --- a/cranelift/src/libcretonne/ir/immediates.rs +++ b/cranelift/src/libcretonne/ir/immediates.rs @@ -60,11 +60,7 @@ impl FromStr for Imm64 { let mut value: u64 = 0; let mut digits = 0; let negative = s.starts_with('-'); - let s2 = if negative { - &s[1..] - } else { - s - }; + let s2 = if negative { &s[1..] } else { s }; if s2.starts_with("0x") { // Hexadecimal. diff --git a/cranelift/src/libcretonne/ir/instructions.rs b/cranelift/src/libcretonne/ir/instructions.rs index ca43a3dc31..9638d660a5 100644 --- a/cranelift/src/libcretonne/ir/instructions.rs +++ b/cranelift/src/libcretonne/ir/instructions.rs @@ -95,10 +95,7 @@ impl FromStr for Opcode { /// `Box` to store the additional information out of line. #[derive(Debug)] pub enum InstructionData { - Nullary { - opcode: Opcode, - ty: Type, - }, + Nullary { opcode: Opcode, ty: Type }, Unary { opcode: Opcode, ty: Type, diff --git a/cranelift/src/libcretonne/settings.rs b/cranelift/src/libcretonne/settings.rs index 186b06fe09..c4f42d4a04 100644 --- a/cranelift/src/libcretonne/settings.rs +++ b/cranelift/src/libcretonne/settings.rs @@ -227,9 +227,7 @@ pub mod detail { #[derive(Clone, Copy)] pub enum Detail { /// A boolean setting only uses one bit, numbered from LSB. - Bool { - bit: u8, - }, + Bool { bit: u8 }, /// A numerical setting uses the whole byte. Num, diff --git a/cranelift/test-all.sh b/cranelift/test-all.sh index 586f2b76f1..64fb83d3a8 100755 --- a/cranelift/test-all.sh +++ b/cranelift/test-all.sh @@ -30,7 +30,7 @@ function banner() { # rustfmt is installed. # # This version should always be bumped to the newest version available. -RUSTFMT_VERSION="0.5.0" +RUSTFMT_VERSION="0.6.0" if cargo install --list | grep -q "^rustfmt v$RUSTFMT_VERSION"; then banner "Rust formatting"