Skip to content

Commit de69d08

Browse files
committed
Explicitly match all terminators
1 parent d86acdd commit de69d08

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

compiler/rustc_mir_dataflow/src/value_analysis.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,17 @@ pub trait ValueAnalysis<'tcx> {
260260
// They would have an effect, but are not allowed in this phase.
261261
bug!("encountered disallowed terminator");
262262
}
263-
_ => {
264-
// The other terminators can be ignored.
263+
TerminatorKind::Goto { .. }
264+
| TerminatorKind::SwitchInt { .. }
265+
| TerminatorKind::Resume
266+
| TerminatorKind::Abort
267+
| TerminatorKind::Return
268+
| TerminatorKind::Unreachable
269+
| TerminatorKind::Assert { .. }
270+
| TerminatorKind::GeneratorDrop
271+
| TerminatorKind::FalseEdge { .. }
272+
| TerminatorKind::FalseUnwind { .. } => {
273+
// These terminators have no effect on the analysis.
265274
}
266275
}
267276
}

0 commit comments

Comments
 (0)