Skip to content

Commit ee5374b

Browse files
committed
Enable otherwise handling in more places
1 parent 7fc1b4f commit ee5374b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

compiler/rustc_borrowck/src/lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -511,11 +511,9 @@ fn get_flow_results<'a, 'tcx>(
511511
body,
512512
Some("borrowck"),
513513
);
514-
let uninits = MaybeUninitializedPlaces::new(tcx, body, move_data).iterate_to_fixpoint(
515-
tcx,
516-
body,
517-
Some("borrowck"),
518-
);
514+
let uninits = MaybeUninitializedPlaces::new(tcx, body, move_data)
515+
.include_inactive_in_otherwise()
516+
.iterate_to_fixpoint(tcx, body, Some("borrowck"));
519517
let ever_inits = EverInitializedPlaces::new(body, move_data).iterate_to_fixpoint(
520518
tcx,
521519
body,

compiler/rustc_borrowck/src/type_check/liveness/trace.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ impl<'a, 'typeck, 'tcx> LivenessContext<'a, 'typeck, 'tcx> {
485485
// case), there are a few dozens compared to e.g. thousands or tens of thousands of
486486
// locals and move paths.
487487
let flow_inits = MaybeInitializedPlaces::new(tcx, body, self.move_data)
488+
.exclude_inactive_in_otherwise()
488489
.iterate_to_fixpoint(tcx, body, Some("borrowck"))
489490
.into_results_cursor(body);
490491
flow_inits

0 commit comments

Comments
 (0)