Skip to main content

Module vars

Module vars 

Source

Re-exports§

use enum_as_inner::EnumAsInner; 🔒
use rustc_middle::ty; 🔒
use crate::frontend::prelude::*; 🔒

Structs§

Binder
Reflects [ty::Binder]
BoundTy
Reflects [ty::BoundTy]
BoundTyRef
Canonical
Reflects [rustc_middle::infer::canonical::Canonical]
DynBinder
A representation of exists<T: Trait1 + Trait2>(value): we create a fresh type id and the appropriate trait clauses. The contained value may refer to the fresh ty and the in-scope trait clauses. This is used to represent types related to dyn Trait.
GenericParamDef
Reflects [ty::GenericParamDef]
LateBinder
A binder that wraps something that may mention the late-bound variables of an item. This does not count for de Bruijn indices: the late bound vars will instead be referred to using LateParam, using the def_id of this binder. That def_id is always that of the item, except in cases where the item doesn’t have a rustc DefId, in which case we use a dummy one.
Placeholder
Reflects [ty::Placeholder]
TyGenerics
Reflects [rustc_trait_elaboration::GenericParams].
BoundVar
DebruijnIndex
A De Bruijn index is a standard means of representing regions (and perhaps later types) in a higher-ranked setting. In particular, imagine a type like this:
EarlyParamRegion
ParamConst
ParamTy

Enums§

BoundRegionKind
Reflects [ty::BoundRegionKind]
BoundTyKind
Reflects [ty::BoundTyKind]
BoundVariableKind
Reflects [ty::BoundVariableKind]
GenericArg
Reflects both [ty::GenericArg] and [ty::GenericArgKind]
GenericParamDefKind
Reflects [ty::GenericParamDefKind]
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.
InferTy
A placeholder for a type that hasn’t been inferred yet.
Variance

Traits§

BinderVariances 🔒
Lets types declare how to compute the variance of bound parameters.

Type Aliases§

CanonicalUserType
Reflects [ty::CanonicalUserType]
PlaceholderConst
Reflects [ty::PlaceholderConst]
PlaceholderTy
Reflects [ty::PlaceholderType]
UnitBinder
PlaceholderRegion
Region