Skip to content

Commit 848610f

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 d185062 commit 848610f

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
@@ -293,6 +293,8 @@ impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
293293
terminator: &'mir mir::Terminator<'tcx>,
294294
location: Location,
295295
) -> TerminatorEdges<'mir, 'tcx> {
296+
// Note: `edges` must be computed first because `drop_flag_effects_for_location` can change
297+
// the result of `is_unwind_dead`.
296298
let mut edges = terminator.edges();
297299
if self.skip_unreachable_unwind
298300
&& let mir::TerminatorKind::Drop { target, unwind, place, replace: _ } = terminator.kind

0 commit comments

Comments
 (0)