struct FlattenBinders<'a, 'db> {
interner: DbInterner<'db>,
enclosing_binders: &'a [BoundVarKinds<'db>],
nested_binder_depth: DebruijnIndex,
}Expand description
Transform a projection for<'a> for<'b> F::Foo<'a, 'b, X> into
for<'a, 'b> F::Foo<'a, 'b, X>. Update de Bruijn indexes for
enclosing binders, but preserve nested binders.
Fields§
§interner: DbInterner<'db>§enclosing_binders: &'a [BoundVarKinds<'db>]§nested_binder_depth: DebruijnIndexImplementations§
Source§impl FlattenBinders<'_, '_>
impl FlattenBinders<'_, '_>
fn flattened_var( &self, debruijn: DebruijnIndex, var: BoundVar, ) -> Option<BoundVar>
Trait Implementations§
Source§impl<'db> TypeFolder<DbInterner<'db>> for FlattenBinders<'_, 'db>
impl<'db> TypeFolder<DbInterner<'db>> for FlattenBinders<'_, 'db>
fn cx(&self) -> DbInterner<'db>
fn fold_binder<T: TypeFoldable<DbInterner<'db>>>( &mut self, binder: Binder<'db, T>, ) -> Binder<'db, T>
fn fold_ty(&mut self, ty: Ty<'db>) -> Ty<'db>
fn fold_region(&mut self, region: Region<'db>) -> Region<'db>
fn fold_const(&mut self, konst: Const<'db>) -> Const<'db>
fn fold_predicate( &mut self, p: <I as Interner>::Predicate, ) -> <I as Interner>::Predicate
fn fold_clauses( &mut self, c: <I as Interner>::Clauses, ) -> <I as Interner>::Clauses
Auto Trait Implementations§
impl<'a, 'db> !RefUnwindSafe for FlattenBinders<'a, 'db>
impl<'a, 'db> !UnwindSafe for FlattenBinders<'a, 'db>
impl<'a, 'db> Freeze for FlattenBinders<'a, 'db>
impl<'a, 'db> Send for FlattenBinders<'a, 'db>
impl<'a, 'db> Sync for FlattenBinders<'a, 'db>
impl<'a, 'db> Unpin for FlattenBinders<'a, 'db>
impl<'a, 'db> UnsafeUnpin for FlattenBinders<'a, 'db>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more