Explicitly match all terminators
This commit is contained in:
parent
d86acdd72a
commit
de69d088a4
1 changed files with 11 additions and 2 deletions
|
@ -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.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue