Update to the rustfmt in rust 1.28, which is now stable.

Also, rustfmt's --write-mode=check is now named --check.
This commit is contained in:
Dan Gohman
2018-08-02 09:05:47 -07:00
parent 26d122306d
commit cd75176f10
40 changed files with 186 additions and 125 deletions

View File

@@ -167,7 +167,8 @@ where
// capable of having the same successor appear
// multiple times, so we must deduplicate.
let mut unique = EntitySet::<Ebb>::new();
for dest_ebb in self.builder
for dest_ebb in self
.builder
.func
.jump_tables
.get(table)
@@ -544,7 +545,8 @@ where
Some(entry) => self.position.ebb.unwrap() == entry,
};
!is_entry && self.func_ctx.ssa.is_sealed(self.position.ebb.unwrap())
&& !self.func_ctx
&& !self
.func_ctx
.ssa
.has_any_predecessors(self.position.ebb.unwrap())
}

View File

@@ -103,7 +103,8 @@ impl<Variable> BlockData<Variable> {
BlockData::EbbHeader(ref mut data) => {
// This a linear complexity operation but the number of predecessors is low
// in all non-pathological cases
let pred: usize = data.predecessors
let pred: usize = data
.predecessors
.iter()
.position(|&PredBlock { branch, .. }| branch == inst)
.expect("the predecessor you are trying to remove is not declared");
@@ -597,7 +598,8 @@ where
} in &mut preds
{
// We already did a full `use_var` above, so we can do just the fast path.
let pred_val = self.variables
let pred_val = self
.variables
.get(temp_arg_var)
.unwrap()
.get(*pred_block)