Skip to content

Commit 74a2142

Browse files
committed
dont iterate over the bitset
1 parent 172c05c commit 74a2142

File tree

1 file changed

+2
-4
lines changed
  • compiler/rustc_const_eval/src/check_consts

1 file changed

+2
-4
lines changed

compiler/rustc_const_eval/src/check_consts/check.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,8 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
289289
if matches!(data.terminator().kind, TerminatorKind::Return) {
290290
let location = ccx.body.terminator_loc(bb);
291291
maybe_storage_live.seek_after_primary_effect(location);
292-
for local in maybe_storage_live.get().iter() {
293-
// If a local may be live here, it is definitely not transient.
294-
transient.remove(local);
295-
}
292+
// If a local may be live here, it is definitely not transient.
293+
transient.subtract(maybe_storage_live.get());
296294
}
297295
}
298296

0 commit comments

Comments
 (0)