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 rustc_type_ir::AliasKind and ty::AliasTy
Align
Reflects [ty::Align], but directly stores the number of bytes as a u64.
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]
ItemRefContents
Contents of ItemRef.
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 [ty::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§

AdtFlags
AdtKind
Reflects [ty::AdtKind]
AliasKind
Reflects [ty::AliasKind]
AliasRelationDirection
Reflects [ty::AliasRelationDirection]
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.
ExternAbi
Reflects [rustc_abi::ExternAbi]
FloatTy
Reflects [rustc_type_ir::FloatTy]
GenericArg
Reflects both [ty::GenericArg] and [ty::GenericArgKind]
GenericParamDefKind
Reflects [ty::GenericParamDefKind]
GenericPredicateId
Uniquely identifies a predicate.
HostEffectPredicate
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
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]

Functions§

compute_unsizing_metadata
resolve_for_dyn 🔒
Do trait resolution in the context of the clauses of a dyn Trait type.

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 ImplExprs 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]