mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-08 10:07:27 +00:00
Rollup merge of #78830 - lcnr:mir-folder, r=oli-obk
fix `super_visit_with` for `Terminator` fixes https://github.com/rust-lang/rust/pull/78182#discussion_r509265149 r? `@oli-obk` cc `@LeSeulArtichaut`
This commit is contained in:
commit
7924ecc341
@ -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 { .. }
|
||||
|
Loading…
Reference in New Issue
Block a user