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:
parent
d18506299b
commit
848610fddc
1 changed files with 2 additions and 0 deletions
|
@ -293,6 +293,8 @@ impl<'tcx> Analysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
|
||||||
terminator: &'mir mir::Terminator<'tcx>,
|
terminator: &'mir mir::Terminator<'tcx>,
|
||||||
location: Location,
|
location: Location,
|
||||||
) -> TerminatorEdges<'mir, 'tcx> {
|
) -> 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();
|
let mut edges = terminator.edges();
|
||||||
if self.skip_unreachable_unwind
|
if self.skip_unreachable_unwind
|
||||||
&& let mir::TerminatorKind::Drop { target, unwind, place, replace: _ } = terminator.kind
|
&& let mir::TerminatorKind::Drop { target, unwind, place, replace: _ } = terminator.kind
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue