Update to rustfmt-preview (#348)

* Update to rustfmt-preview.

* Run "cargo fmt --all" with rustfmt 0.4.1.

rustfmt 0.4.1 is the latest release of rustfmt-preview available on the
stable channel.

* Fix a long line that rustfmt 0.4.1 can't handle.

* Remove unneeded commas left behind by rustfmt.
This commit is contained in:
Dan Gohman
2018-05-25 11:38:38 -07:00
committed by GitHub
parent 99f6055c55
commit 6b88cd44a8
137 changed files with 1914 additions and 2380 deletions

View File

@@ -346,10 +346,12 @@ pub fn write_operands(
write_ebb_args(w, &args[2..])
}
BranchTable { arg, table, .. } => write!(w, " {}, {}", arg, table),
Call { func_ref, ref args, .. } => {
write!(w, " {}({})", func_ref, DisplayValues(args.as_slice(pool)))
}
CallIndirect { sig_ref, ref args, .. } => {
Call {
func_ref, ref args, ..
} => write!(w, " {}({})", func_ref, DisplayValues(args.as_slice(pool))),
CallIndirect {
sig_ref, ref args, ..
} => {
let args = args.as_slice(pool);
write!(
w,
@@ -360,7 +362,9 @@ pub fn write_operands(
)
}
FuncAddr { func_ref, .. } => write!(w, " {}", func_ref),
StackLoad { stack_slot, offset, .. } => write!(w, " {}{}", stack_slot, offset),
StackLoad {
stack_slot, offset, ..
} => write!(w, " {}{}", stack_slot, offset),
StackStore {
arg,
stack_slot,
@@ -368,7 +372,9 @@ pub fn write_operands(
..
} => write!(w, " {}, {}{}", arg, stack_slot, offset),
HeapAddr { heap, arg, imm, .. } => write!(w, " {}, {}, {}", heap, arg, imm),
Load { flags, arg, offset, .. } => write!(w, "{} {}{}", flags, arg, offset),
Load {
flags, arg, offset, ..
} => write!(w, "{} {}{}", flags, arg, offset),
LoadComplex {
flags,
ref args,
@@ -383,7 +389,6 @@ pub fn write_operands(
DisplayValuesWithDelimiter(&args, '+'),
offset
)
}
Store {
flags,
@@ -452,8 +457,12 @@ pub fn write_operands(
}
Trap { code, .. } => write!(w, " {}", code),
CondTrap { arg, code, .. } => write!(w, " {}, {}", arg, code),
IntCondTrap { cond, arg, code, .. } => write!(w, " {} {}, {}", cond, arg, code),
FloatCondTrap { cond, arg, code, .. } => write!(w, " {} {}, {}", cond, arg, code),
IntCondTrap {
cond, arg, code, ..
} => write!(w, " {} {}, {}", cond, arg, code),
FloatCondTrap {
cond, arg, code, ..
} => write!(w, " {} {}, {}", cond, arg, code),
}
}