1
Fork 0

Explicitly match all terminators

This commit is contained in:
Jannis Christopher Köhl 2022-10-23 15:05:03 +02:00
parent d86acdd72a
commit de69d088a4

View file

@ -260,8 +260,17 @@ pub trait ValueAnalysis<'tcx> {
// They would have an effect, but are not allowed in this phase. // They would have an effect, but are not allowed in this phase.
bug!("encountered disallowed terminator"); bug!("encountered disallowed terminator");
} }
_ => { TerminatorKind::Goto { .. }
// The other terminators can be ignored. | TerminatorKind::SwitchInt { .. }
| TerminatorKind::Resume
| TerminatorKind::Abort
| TerminatorKind::Return
| TerminatorKind::Unreachable
| TerminatorKind::Assert { .. }
| TerminatorKind::GeneratorDrop
| TerminatorKind::FalseEdge { .. }
| TerminatorKind::FalseUnwind { .. } => {
// These terminators have no effect on the analysis.
} }
} }
} }