Skip to main content

Module binder

Module binder 

Source

Re-exportsΒ§

use std::fmt; πŸ”’
use std::hash::Hash; πŸ”’
use std::hash::Hash; πŸ”’
use std::marker::PhantomData; πŸ”’
use std::ops::ControlFlow; πŸ”’
use std::ops::Deref; πŸ”’
use derive_where::derive_where; πŸ”’
use rustc_macros::Decodable_NoContext; πŸ”’
use rustc_macros::Encodable_NoContext; πŸ”’
use rustc_macros::StableHash; πŸ”’
use rustc_macros::StableHash_NoContext; πŸ”’
use rustc_type_ir_macros::GenericTypeVisitable; πŸ”’
use rustc_type_ir_macros::Lift_Generic; πŸ”’
use rustc_type_ir_macros::TypeFoldable_Generic; πŸ”’
use rustc_type_ir_macros::TypeVisitable_Generic; πŸ”’
use tracing::instrument; πŸ”’
use tracing::instrument; πŸ”’
use crate::data_structures::SsoHashSet; πŸ”’
use crate::fold::FallibleTypeFolder; πŸ”’
use crate::fold::TypeFoldable; πŸ”’
use crate::fold::TypeFolder; πŸ”’
use crate::fold::TypeSuperFoldable; πŸ”’
use crate::visit::Flags; πŸ”’
use crate::visit::TypeSuperVisitable; πŸ”’
use crate::visit::TypeVisitable; πŸ”’
use crate::visit::TypeVisitableExt; πŸ”’
use crate::visit::TypeVisitor; πŸ”’
use crate as ty; πŸ”’
use crate::Const; πŸ”’
use crate::DebruijnIndex; πŸ”’
use crate::Interner; πŸ”’
use crate::PredicateProxy; πŸ”’
use crate::Region; πŸ”’
use crate::UniverseIndex; πŸ”’
use crate::Unnormalized; πŸ”’
use crate::inherent::*; πŸ”’

MacrosΒ§

generate πŸ”’

StructsΒ§

ArgFolder πŸ”’
Binder
Binder is a binder for higher-ranked lifetimes or types. It is part of the compiler’s representation for things like for<'a> Fn(&'a isize) (which would be represented by the type PolyTraitRef == Binder<I, TraitRef>).
BoundConst
BoundRegion
BoundTy
EarlyBinder
Similar to Binder except that it tracks early bound generics, i.e. struct Foo<T>(T) needs T instantiated immediately. This type primarily exists to avoid forgetting to call instantiate.
EarlyBinderIter
IterIdentityCopied
IterInstantiated
IterInstantiatedCopied
Placeholder
The β€œplaceholder index” fully defines a placeholder region, type, or const. Placeholders are identified by both a universe, as well as a name residing within that universe. Distinct bound regions/types/consts within the same universe simply have an unknown relationship to one
ValidateBoundVars

EnumsΒ§

BoundRegionKind
BoundTyKind
BoundVarIndexKind
Okay, we do something fun for Bound types/regions/consts: Specifically, we distinguish between canonically bound things and for<> bound things. And, really, it comes down to caching during canonicalization and instantiation.
BoundVariableKind

Type AliasesΒ§

PlaceholderConst
PlaceholderRegion
PlaceholderType