1
Fork 0

Rollup merge of #107398 - scottmcm:its-their-funeral, r=dtolnay

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.

r? libs
This commit is contained in:
Matthias Krüger 2023-01-28 11:11:09 +01:00 committed by GitHub
commit c95707a29b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 28 additions and 74 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(())
}
}
}