Rollup merge of #50958 - KiChjang:nit-50697, r=pnkfelix
Micro-optimization on PR#50697 We should stop iterating through the indices in the `init_path_map` once we've already found a match for the local. r? @nikomatsakis or @pnkfelix
This commit is contained in:
commit
e6495d12b6
@ -1853,6 +1853,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
|
||||
for index in ii {
|
||||
if flow_state.ever_inits.contains(index) {
|
||||
self.used_mut.insert(*local);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user