Skip to content

Commit ac74713

Browse files
committed
Add a comment to MaybeInitializedPlaces::apply_terminator_effect.
I tried reordering this method to more closely match `MaybeUninitializedPlaces::apply_terminator_effect`, but doing so breaks tests.
1 parent a1f2999 commit ac74713

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_mir_dataflow/src/impls/initialized.rs

+2
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,8 @@ impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
357357
terminator: &'mir mir::Terminator<'tcx>,
358358
location: Location,
359359
) -> TerminatorEdges<'mir, 'tcx> {
360+
// Note: `edges` must be computed first because `drop_flag_effects_for_location` can change
361+
// the result of `is_unwind_dead`.
360362
let mut edges = terminator.edges();
361363
if self.skip_unreachable_unwind
362364
&& let mir::TerminatorKind::Drop { target, unwind, place, replace: _ } = terminator.kind

0 commit comments

Comments
 (0)