instantiate canonical vars eagerly
This commit is contained in:
parent
b738b06160
commit
bf7dbff921
11 changed files with 509 additions and 496 deletions
|
@ -1106,17 +1106,6 @@ impl<'tcx, T> Binder<'tcx, T> {
|
|||
if self.0.has_escaping_bound_vars() { None } else { Some(self.skip_binder()) }
|
||||
}
|
||||
|
||||
pub fn no_bound_vars_ignoring_escaping(self, tcx: TyCtxt<'tcx>) -> Option<T>
|
||||
where
|
||||
T: TypeFoldable<'tcx>,
|
||||
{
|
||||
if !self.0.has_escaping_bound_vars() {
|
||||
Some(self.skip_binder())
|
||||
} else {
|
||||
self.0.try_fold_with(&mut SkipBindersAt { index: ty::INNERMOST, tcx }).ok()
|
||||
}
|
||||
}
|
||||
|
||||
/// Splits the contents into two things that share the same binder
|
||||
/// level as the original, returning two distinct binders.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue