1
Fork 0

Remove ControlFlow::{BREAK, CONTINUE}

Libs-API decided to remove these in #102697.

Follow-up to #107023, which removed them from `compiler/`, but a couple new ones showed up since that was merged.
This commit is contained in:
Scott McMurray 2023-01-27 19:46:42 -08:00
parent 7d4df2d30e
commit 868d099a72
6 changed files with 19 additions and 62 deletions

View file

@ -93,24 +93,24 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
if t.needs_infer() {
if ty::Term::from(t) == self.term {
ControlFlow::BREAK
ControlFlow::Break(())
} else {
t.super_visit_with(self)
}
} else {
ControlFlow::CONTINUE
ControlFlow::Continue(())
}
}
fn visit_const(&mut self, c: ty::Const<'tcx>) -> ControlFlow<Self::BreakTy> {
if c.needs_infer() {
if ty::Term::from(c) == self.term {
ControlFlow::BREAK
ControlFlow::Break(())
} else {
c.super_visit_with(self)
}
} else {
ControlFlow::CONTINUE
ControlFlow::Continue(())
}
}
}