Use ControlFlow::is{break,continue}
This commit is contained in:
parent
8e4cf0b3ed
commit
24e1a7e656
10 changed files with 25 additions and 25 deletions
|
@ -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