Skip to main content

Module types

Module types 

Source

Modules§

vars 🔒
Type-level variables. There are 4 kinds of variables at the type-level: regions, types, const generics and trait clauses. The relevant definitions are in this module.

Structs§

Binder
A value of type T bound by generic parameters. Used in any context where we’re adding generic parameters that aren’t on the top-level item, e.g. for<'a> clauses (uses RegionBinder for now), trait methods, GATs (TODO).
BindingStack
A stack of values corresponding to nested binders. Each binder introduces an entry in this stack, with the entry as index 0 being the innermost binder. This is indexed by DeBruijnIds. Most methods assume that the stack is non-empty and panic if not.
ClosureInfo
Additional information for closures.
ConstGenericParam
A const generic variable in a signature or binder.
ConstGenericVarId
DeBruijnId
The index of a binder, counting from the innermost. See DeBruijnVar for details.
DynPredicate
The contents of a dyn Trait type.
Field
FieldId
FunSig
A function signature.
GenericArgs
A set of generic arguments.
GenericParams
Generic parameters for a declaration, including predicates.
Layout
Simplified type layout information.
OutlivesPred
.0 outlives .1
RegionBinder
A value of type T bound by regions. We should use binder instead but this causes name clash issues in the derived ocaml visitors.
RegionId
RegionParam
A region variable in a signature or binder.
ReprOptions
The representation options as annotated by the user.
TraitClauseId
TraitDeclRef
A predicate of the form Type: Trait<Args>.
TraitImplRef
A reference to a tait impl, using the provided arguments.
TraitParam
A trait predicate in a signature, of the form Type: Trait<Args>. This functions like a variable binder, to which variables of the form TraitRefKind::Clause can refer to.
TraitRef
A reference to a trait.
TraitRefContents
TraitTypeConstraint
A constraint over a trait associated type.
TraitTypeConstraintId
Ty
A type.
TypeDecl
A type declaration.
TypeDeclRef
Reference to a type declaration or builtin type.
TypeParam
A type variable in a signature or binder.
TypeVarId
Variant
VariantId
VariantLayout
Simplified layout of a single variant.

Enums§

AlignmentModifier
Describes modifiers to the alignment and packing of the corresponding type. Represents repr(align(n)) and repr(packed(n)).
BinderKind
BuiltinImplData
Describes a built-in impl. Mostly lists the implemented trait, sometimes with more details about the contents of the implementation.
BuiltinTy
Builtin types identifiers.
ClosureKind
DeBruijnVar
Type-level variable.
Discriminator
Decision tree used to determine the active variant by reading memory. Mirrors MiniRust’s Discriminator.
FloatTy
IntTy
IntegerTy
LifetimeMutability
The nature of locations where a given lifetime parameter is used. If this lifetime ever flows to be used as the lifetime of a mutable reference &'a mut then we consider it mutable.
LiteralTy
Types of primitive values. Either an integer, bool, char
PredicateOrigin
Where a given predicate came from.
PtrMetadata
The metadata stored in a pointer. That’s the information stored in pointers alongside their address. It’s empty for Sized types, and interesting for unsized aka dynamically-sized types.
RefKind
Region
ReprAlgorithm
Describes which layout algorithm is used for representing the corresponding type. Depends on the #[repr(...)] used.
TraitRefKind
Identifier of a trait instance. This is derived from the trait resolution.
TyKind
TypeDeclKind
TypeId
Type identifier.
UIntTy

Type Aliases§

BoxedArgs
ByteCount
ClauseDbVar
ConstGenericDbVar
PolyTraitDeclRef
A quantified trait predicate, e.g. for<'a> Type<'a>: Trait<'a, Args>.
RegionDbVar
RegionOutlives
TypeDbVar
TypeOutlives