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.
ConstGenericVar
A const generic variable in a signature or binder.
ConstGenericVarId
DeBruijnId
The index of a binder, counting from the innermost. See DeBruijnVar for details.
DiscriminantLayout
Layout of the discriminant. Describes the offset of the discriminant field as well as its encoding as tag in memory.
ExistentialPredicate
A predicate of the form exists<T> where T: Trait.
Field
FieldId
FunSig
A function signature.
GenericArgs
A set of generic arguments.
GenericParams
Generic parameters for a declaration. We group the generics which come from the Rust compiler substitutions (the regions, types and const generics) as well as the trait clauses. The reason is that we consider that those are parameters that need to be filled. We group in a different place the predicates which are not trait clauses, because those enforce constraints but do not need to be filled with witnesses/instances.
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. TODO: merge with binder
RegionId
RegionVar
A region variable in a signature or binder.
TraitClause
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.
TraitClauseId
TraitDeclRef
A predicate of the form Type: Trait<Args>.
TraitImplRef
A reference to a tait impl, using the provided arguments.
TraitRef
A reference to a trait
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.
TypeVar
A type variable in a signature or binder.
TypeVarId
VTable
A placeholder for the vtable of a trait object. To be implemented in the future when dyn Trait is fully supported.
Variant
VariantId
VariantLayout
Simplified layout of a single variant.

Enums§

BinderKind
BuiltinTy
Builtin types identifiers.
ClosureKind
ConstGeneric
Const Generic Values. Either a primitive value, or a variable corresponding to a primitve value
DeBruijnVar
Type-level variable.
FloatTy
IntegerTy
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
TagEncoding
Describes how we represent the active enum variant in memory.
TraitRefKind
Identifier of a trait instance. This is derived from the trait resolution.
TyKind
TypeDeclKind
TypeId
Type identifier.

Type Aliases§

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