diff --git a/cranelift/test-all.sh b/cranelift/test-all.sh index fb17e35d82..f741c54eb4 100755 --- a/cranelift/test-all.sh +++ b/cranelift/test-all.sh @@ -27,8 +27,7 @@ function banner { # Run rustfmt if we have it. banner "Rust formatting" if type rustfmt > /dev/null; then - # In newer versions of rustfmt, replace --write-mode=diff with --check. - if ! "$topdir/format-all.sh" --write-mode=diff ; then + if ! "$topdir/format-all.sh" --write-mode=check ; then echo "Formatting diffs detected! Run \"cargo fmt --all\" to correct." exit 1 fi diff --git a/lib/codegen/src/write.rs b/lib/codegen/src/write.rs index 38367adb1b..2f0f6ba25f 100644 --- a/lib/codegen/src/write.rs +++ b/lib/codegen/src/write.rs @@ -148,12 +148,7 @@ fn write_preamble( // // Basic blocks -fn write_arg( - w: &mut Write, - func: &Function, - regs: Option<&RegInfo>, - arg: Value, -) -> fmt::Result { +fn write_arg(w: &mut Write, func: &Function, regs: Option<&RegInfo>, arg: Value) -> fmt::Result { write!(w, "{}: {}", arg, func.dfg.value_type(arg))?; let loc = func.locations[arg]; if loc.is_assigned() {