Use ControlFlow::is{break,continue}
This commit is contained in:
parent
8e4cf0b3ed
commit
24e1a7e656
10 changed files with 25 additions and 25 deletions
|
@ -869,8 +869,9 @@ fn contains_illegal_self_type_reference<'tcx, T: TypeFoldable<'tcx>>(
|
|||
}
|
||||
}
|
||||
|
||||
value.visit_with(&mut IllegalSelfTypeVisitor { tcx, trait_def_id, supertraits: None })
|
||||
== ControlFlow::BREAK
|
||||
value
|
||||
.visit_with(&mut IllegalSelfTypeVisitor { tcx, trait_def_id, supertraits: None })
|
||||
.is_break()
|
||||
}
|
||||
|
||||
pub fn provide(providers: &mut ty::query::Providers) {
|
||||
|
|
|
@ -248,7 +248,7 @@ impl<'a, 'tcx> TypeVisitor<'tcx> for Search<'a, 'tcx> {
|
|||
let ty = self.tcx().normalize_erasing_regions(ty::ParamEnv::empty(), field_ty);
|
||||
debug!("structural-match ADT: field_ty={:?}, ty={:?}", field_ty, ty);
|
||||
|
||||
if ty.visit_with(self) == ControlFlow::BREAK {
|
||||
if ty.visit_with(self).is_break() {
|
||||
// found an ADT without structural-match; halt visiting!
|
||||
assert!(self.found.is_some());
|
||||
return ControlFlow::BREAK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue