Skip to content

Commit 93ee779

Browse files
Explain why visit_terminator does nothing for IndirectlyMutableLocals
1 parent b3e59bb commit 93ee779

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_mir/dataflow/impls/indirect_mutation.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ impl<'tcx> Visitor<'tcx> for TransferFunction<'_, '_, 'tcx> {
133133

134134

135135
fn visit_terminator(&mut self, terminator: &mir::Terminator<'tcx>, location: Location) {
136+
// This method purposely does nothing except call `super_terminator`. It exists solely to
137+
// document the subtleties around drop terminators.
138+
136139
self.super_terminator(terminator, location);
137140

138141
if let mir::TerminatorKind::Drop { location: _, .. }

0 commit comments

Comments
 (0)