TypeVisitor: use ControlFlow
in rustc_{infer,lint,trait_selection}
This commit is contained in:
parent
2c85b6fae0
commit
4fe735b320
13 changed files with 106 additions and 82 deletions
|
@ -4,6 +4,7 @@ use rustc_middle::ty;
|
|||
use rustc_middle::ty::fold::{TypeFoldable, TypeFolder, TypeVisitor};
|
||||
|
||||
use std::fmt;
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
// Structural impls for the structs in `traits`.
|
||||
|
||||
|
@ -68,7 +69,7 @@ impl<'tcx, O: TypeFoldable<'tcx>> TypeFoldable<'tcx> for traits::Obligation<'tcx
|
|||
}
|
||||
}
|
||||
|
||||
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool {
|
||||
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<(), ()> {
|
||||
self.predicate.visit_with(visitor)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue