TypeVisitor: use std::ops::ControlFlow
instead of bool
This commit is contained in:
parent
8df58ae03a
commit
2c85b6fae0
10 changed files with 243 additions and 165 deletions
|
@ -46,7 +46,7 @@ use std::cell::RefCell;
|
|||
use std::cmp::Ordering;
|
||||
use std::fmt;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::ops::Range;
|
||||
use std::ops::{ControlFlow, Range};
|
||||
use std::ptr;
|
||||
use std::str;
|
||||
|
||||
|
@ -1776,8 +1776,9 @@ impl<'tcx> TypeFoldable<'tcx> for ParamEnv<'tcx> {
|
|||
ParamEnv::new(self.caller_bounds().fold_with(folder), self.reveal().fold_with(folder))
|
||||
}
|
||||
|
||||
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool {
|
||||
self.caller_bounds().visit_with(visitor) || self.reveal().visit_with(visitor)
|
||||
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<(), ()> {
|
||||
self.caller_bounds().visit_with(visitor)?;
|
||||
self.reveal().visit_with(visitor)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue