tidy fixes
This commit is contained in:
parent
2255786212
commit
9910dee677
3 changed files with 9 additions and 4 deletions
|
|
@ -2933,4 +2933,4 @@ impl<'tcx> TypeFoldable<'tcx> for Literal<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
newtype_index!(LocalWithRegion);
|
||||
newtype_index!(LocalWithRegion);
|
||||
|
|
|
|||
|
|
@ -408,7 +408,10 @@ impl ToRegionVid for RegionVid {
|
|||
}
|
||||
}
|
||||
|
||||
fn live_variable_set(regular: &LocalSet<LocalWithRegion>, drops: &LocalSet<LocalWithRegion>) -> String {
|
||||
fn live_variable_set(
|
||||
regular: &LocalSet<LocalWithRegion>,
|
||||
drops: &LocalSet<LocalWithRegion>
|
||||
) -> String {
|
||||
// sort and deduplicate:
|
||||
let all_locals: BTreeSet<_> = regular.iter().chain(drops.iter()).collect();
|
||||
|
||||
|
|
|
|||
|
|
@ -570,7 +570,10 @@ impl LiveVariableMap for NllLivenessMap {
|
|||
impl NllLivenessMap {
|
||||
pub fn compute(mir: &Mir) -> Self {
|
||||
let mut to_local = IndexVec::default();
|
||||
let from_local: IndexVec<Local,Option<_>> = mir.local_decls.iter_enumerated().map(|(local, local_decl)| {
|
||||
let from_local: IndexVec<Local,Option<_>> = mir
|
||||
.local_decls
|
||||
.iter_enumerated()
|
||||
.map(|(local, local_decl)| {
|
||||
if local_decl.ty.has_free_regions() {
|
||||
Some(to_local.push(local))
|
||||
}
|
||||
|
|
@ -582,4 +585,3 @@ impl NllLivenessMap {
|
|||
Self { from_local, to_local }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue