Skip to main content

Module ty

Module ty 

Source
Expand description

Copies of the relevant type-level types. These are semantically-rich representations of type-level concepts such as types and trait references.

Structs§

Alias
This type merges the information from [ty::AliasTyKind] and [ty::AliasTy].
Align
Reflects [rustc_abi::Align]. We store the exponent of the alignment.
AssocItem
Reflects [ty::AssocItem]
Binder
Reflects [ty::Binder]
BoundRegion
Reflects [ty::BoundRegion]
BoundTy
Reflects [ty::BoundTy]
Canonical
Reflects [rustc_middle::infer::canonical::Canonical]
CanonicalUserTypeAnnotation
Reflects [ty::CanonicalUserTypeAnnotation]
Clause
Reflects [ty::Clause] and adds a hash-consed predicate identifier.
ClosureArgs
Reflects [ty::ClosureArgs]
CoercePredicate
Reflects [ty::CoercePredicate]
Decorated
Generic container for decorating items with a type, a span, attributes and other meta-data.
DiscriminantValue
Reflects [ty::util::Discr]
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.
EarlyParamRegion
Reflects [ty::EarlyParamRegion]
ExistentialProjection
Reflects [rustc_type_ir::ExistentialProjection]
ExistentialTraitRef
Reflects [rustc_type_ir::ExistentialTraitRef]
FieldDef
Reflects [ty::FieldDef]
GenericParamDef
Reflects [ty::GenericParamDef]
GenericPredicate
GenericPredicates
Reflects [ty::GenericPredicates]
LateParamRegion
Reflects [ty::LateParamRegion]
OutlivesPredicate
Reflects [ty::OutlivesPredicate] as a named struct instead of a tuple struct. This is because the script converting JSONSchema types to OCaml doesn’t support tuple structs, and this is the only tuple struct in the whole AST.
ParamConst
Reflects [ty::ParamConst]
ParamTy
Reflects [ty::ParamTy]
Placeholder
Reflects [ty::Placeholder]
Predicate
Reflects [ty::Predicate] and adds a hash-consed predicate identifier.
ProjectionPredicate
Expresses a constraints over an associated type.
Region
Reflects [ty::Region]
ReprFlags
The representation flags without the ones irrelevant outside of rustc.
ReprOptions
Reflects [rustc_abi::ReprOptions].
SubtypePredicate
Reflects [ty::SubtypePredicate]
TraitPredicate
Reflects [ty::TraitPredicate]
Ty
Reflects [rustc_middle::ty::Ty]
TyFnSig
Reflects [ty::FnSig]
TyGenerics
Reflects [ty::Generics]
TypeAndMut
Reflects [ty::TypeAndMut]
UserArgs
Reflects [ty::UserArgs]
UserSelfTy
Reflects [ty::UserSelfTy]
VariantDef
Reflects [ty::VariantDef]

Enums§

AdtKind
Reflects [ty::AdtKind]
AliasKind
Reflects [rustc_middle::ty::AliasTyKind].
AssocItemContainer
AssocKind
Reflects [ty::AssocKind]
AssocTypeData
Reflects [ty::AssocTypeData]
BoundRegionKind
Reflects [ty::BoundRegionKind]
BoundTyKind
Reflects [ty::BoundTyKind]
BoundVarIndexKind
Reflects [ty::BoundVarIndexKind]
BoundVariableKind
Reflects [ty::BoundVariableKind]
ClauseKind
Reflects [ty::ClauseKind]
ClosureKind
Reflects [ty::ClosureKind]
DiscriminantDefinition
Reflects [ty::VariantDiscr]
ExistentialPredicate
A predicate without Self, for use in dyn Trait.
FloatTy
Reflects [rustc_type_ir::FloatTy]
GenericArg
Reflects both [ty::GenericArg] and [ty::GenericArgKind]
GenericParamDefKind
Reflects [ty::GenericParamDefKind]
GenericPredicateId
Uniquely identifies a predicate.
HostEffectClause
ImplTraitInTraitData
Reflects [ty::ImplTraitInTraitData]
InferTy
Reflects partially [ty::InferTy]
IntTy
Reflects [rustc_type_ir::IntTy]
LateParamRegionKind
Reflects [ty::LateParamRegionKind]
LitIntType
Reflects both [ty::GenericArg] and [ty::GenericArgKind]
NormalizesTo
Pattern
PredicateKind
Reflects [ty::PredicateKind]
RegionKind
Reflects [ty::RegionKind]
Term
Reflects [ty::Term]
TyKind
Reflects [ty::TyKind]
UintTy
Reflects [rustc_type_ir::UintTy]
UnsizingMetadata
The metadata to attach to the newly-unsized ptr.
UserType
Reflects [ty::UserType]: this is currently disabled, and everything is printed as debug in the UserType::Todo variant.
Variance
Reflects [ty::Variance]
Visibility
Reflects [ty::Visibility]
ExternAbi
ABI we expect to see within extern "{abi}"

Traits§

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

Functions§

alias_ty_kind_def_id
closure_sig
Retrieve a closure’s signature, recovering the regions that rustc erased as fresh bound regions.
compute_unsizing_metadata
resolve_for_dyn 🔒
tupled_args_ty
The arguments of the given signature, tupled as the Fn* traits take them, e.g. (A, B, C). The result binds the same variables as the signature it comes from, so that the two agree on the regions they use.

Type Aliases§

BoundVar
CanonicalUserType
Reflects [ty::CanonicalUserType]
DebruijnIndex
PlaceholderConst
Reflects [ty::PlaceholderConst]
PlaceholderRegion
Reflects [ty::PlaceholderRegion]
PlaceholderType
Reflects [ty::PlaceholderType]
PolyFnSig
Reflects [ty::PolyFnSig]
RegionOutlivesPredicate
Reflects [ty::RegionOutlivesPredicate]
RegionVid
TraitRef
Reflects [ty::TraitRef] Contains the def_id and arguments passed to the trait. The first type argument is the Self type. The trait proofs are the required predicate for this trait; currently they are always empty because we consider all trait predicates as implied. self.in_trait is always None because a trait can’t be associated to another one.
TypeOutlivesPredicate
Reflects [ty::TypeOutlivesPredicate]