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.
This commit is contained in:
Nicholas Nethercote 2024-11-22 06:20:53 +11:00
parent d18506299b
commit 848610fddc

View file

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