1
Fork 0

fix super_visit_with for Terminator

This commit is contained in:
Bastian Kauschke 2020-11-07 11:54:35 +01:00
parent a601302ff0
commit 103f7a499b

View file

@ -109,7 +109,7 @@ impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx> {
args.visit_with(visitor)
}
Assert { ref cond, ref msg, .. } => {
if cond.visit_with(visitor).is_break() {
cond.visit_with(visitor)?;
use AssertKind::*;
match msg {
BoundsCheck { ref len, ref index } => {
@ -125,9 +125,6 @@ impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx> {
}
ResumedAfterReturn(_) | ResumedAfterPanic(_) => ControlFlow::CONTINUE,
}
} else {
ControlFlow::CONTINUE
}
}
InlineAsm { ref operands, .. } => operands.visit_with(visitor),
Goto { .. }