Fix indentation
This commit is contained in:
parent
c872f47276
commit
b28aeeb04e
2 changed files with 35 additions and 35 deletions
|
@ -102,37 +102,37 @@ fn find_dead_unwinds<'a, 'tcx>(
|
||||||
_ => continue,
|
_ => continue,
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut init_data = InitializationData {
|
let mut init_data = InitializationData {
|
||||||
live: flow_inits.sets().on_entry_set_for(bb.index()).to_owned(),
|
live: flow_inits.sets().on_entry_set_for(bb.index()).to_owned(),
|
||||||
dead: IdxSetBuf::new_empty(env.move_data.move_paths.len()),
|
dead: IdxSetBuf::new_empty(env.move_data.move_paths.len()),
|
||||||
};
|
};
|
||||||
debug!("find_dead_unwinds @ {:?}: {:?}; init_data={:?}",
|
debug!("find_dead_unwinds @ {:?}: {:?}; init_data={:?}",
|
||||||
bb, bb_data, init_data.live);
|
bb, bb_data, init_data.live);
|
||||||
for stmt in 0..bb_data.statements.len() {
|
for stmt in 0..bb_data.statements.len() {
|
||||||
let loc = Location { block: bb, statement_index: stmt };
|
let loc = Location { block: bb, statement_index: stmt };
|
||||||
init_data.apply_location(tcx, mir, env, loc);
|
init_data.apply_location(tcx, mir, env, loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
let path = match env.move_data.rev_lookup.find(location) {
|
let path = match env.move_data.rev_lookup.find(location) {
|
||||||
LookupResult::Exact(e) => e,
|
LookupResult::Exact(e) => e,
|
||||||
LookupResult::Parent(..) => {
|
LookupResult::Parent(..) => {
|
||||||
debug!("find_dead_unwinds: has parent; skipping");
|
debug!("find_dead_unwinds: has parent; skipping");
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
debug!("find_dead_unwinds @ {:?}: path({:?})={:?}", bb, location, path);
|
debug!("find_dead_unwinds @ {:?}: path({:?})={:?}", bb, location, path);
|
||||||
|
|
||||||
let mut maybe_live = false;
|
let mut maybe_live = false;
|
||||||
on_all_drop_children_bits(tcx, mir, &env, path, |child| {
|
on_all_drop_children_bits(tcx, mir, &env, path, |child| {
|
||||||
let (child_maybe_live, _) = init_data.state(child);
|
let (child_maybe_live, _) = init_data.state(child);
|
||||||
maybe_live |= child_maybe_live;
|
maybe_live |= child_maybe_live;
|
||||||
});
|
});
|
||||||
|
|
||||||
debug!("find_dead_unwinds @ {:?}: maybe_live={}", bb, maybe_live);
|
debug!("find_dead_unwinds @ {:?}: maybe_live={}", bb, maybe_live);
|
||||||
if !maybe_live {
|
if !maybe_live {
|
||||||
dead_unwinds.add(&bb);
|
dead_unwinds.add(&bb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dead_unwinds
|
dead_unwinds
|
||||||
|
|
|
@ -3331,15 +3331,15 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
||||||
.join(", ");
|
.join(", ");
|
||||||
|
|
||||||
struct_span_err!(tcx.sess, span, E0063,
|
struct_span_err!(tcx.sess, span, E0063,
|
||||||
"missing field{} {}{} in initializer of `{}`",
|
"missing field{} {}{} in initializer of `{}`",
|
||||||
if remaining_fields.len() == 1 { "" } else { "s" },
|
if remaining_fields.len() == 1 { "" } else { "s" },
|
||||||
remaining_fields_names,
|
remaining_fields_names,
|
||||||
truncated_fields_error,
|
truncated_fields_error,
|
||||||
adt_ty)
|
adt_ty)
|
||||||
.span_label(span, format!("missing {}{}",
|
.span_label(span, format!("missing {}{}",
|
||||||
remaining_fields_names,
|
remaining_fields_names,
|
||||||
truncated_fields_error))
|
truncated_fields_error))
|
||||||
.emit();
|
.emit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue