This type merges the information from
rustc_type_ir::AliasKind
and ty::AliasTy
Reflects [hir::AnonConst
]
Reflects
ty::Clause
and adds a hash-consed predicate identifier.
Reflects [ty::ClosureArgs
]
Reflects [hir::ConstArg
]
Generic container for decorating items with a type, a span,
attributes and other meta-data.
Reflects [rustc_hir::definitions::DisambiguatedDefPathData
]
Reflects [rustc_type_ir::ExistentialProjection
]
Reflects [rustc_type_ir::ExistentialTraitRef
]
A field expression: a field name along with a value
A field pattern: a field name along with a pattern
Reflects [hir::FnDecl
]
Function definition
Reflects [hir::FnHeader
]
Reflects [hir::FnSig
]
Reflects [hir::ForeignItem
]
Field Record Update (FRU) informations, this reflects
thir::FruInfo
Reflects [hir::GenericParam
]
Reflects [hir::Generics
]
A
hash map implemented with quadratic probing and SIMD lookup.
Reflects [hir::FieldDef
]
Reflects [hir::hir_id::HirId
]
Reflects [hir::Impl
].
An associated item in a trait impl. This can be an item provided by the trait impl, or an item
that reuses the trait decl default value.
An ImplExpr
describes the full data of a trait implementation. Because of generics, this may
need to combine several concrete trait implementation items. For example, ((1u8, 2u8), "hello").clone()
combines the generic implementation of Clone
for (A, B)
with the
concrete implementations for u8
and &str
, represented as a tree.
Meta-informations about an impl<GENERICS[: PREDICATES]> TRAIT for TYPE where PREDICATES {}
Reflects [hir::ImplItem
]
Reflects [hir::Item
] (and [hir::ItemId
])
Reflects [hir::OpaqueTy
]
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.
An owned, mutable path (akin to
String
).
Reflects [hir::PathSegment
]
Reflects
ty::Predicate
and adds a hash-consed predicate identifier.
A PredicateId
is a unique identifier for a clause or a
predicate. It is computed by hashing predicates and clause in a
uniform and deterministic way.
Stores a set of predicates along with where they came from.
Expresses a constraints over an associated type.
A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference
Counted’.
Reflects [ty::ReprOptions
]
Reflects [hir::TraitItem
]
A map that maps types to values in a generic manner: we store for each type T
a value of
type M::Value<T>
.
Reflects [hir::UsePath
]
Reflects [hir::Variant
]
Describe a variant
A DefId
identifies a particular definition, by combining a crate
index and a def index.
A LocalDefId
is equivalent to a DefId
with krate == LOCAL_CRATE
. Since
we encode this information in the type, we can ensure at compile time that
no DefId
s from upstream crates get thrown into the mix. There are quite a
few cases where we know that only DefId
s from the local crate are expected;
a DefId
from a different crate would signify a bug somewhere. This
is when LocalDefId
comes in handy.
Reflects [ty::AliasKind
]
Reflects [ty::AliasRelationDirection
]
Reflects [hir::AssocItemKind
]
Reflects [rustc_middle::infer::canonical::CanonicalTyVarKind
]
Reflects [rustc_middle::infer::canonical::CanonicalVarKind
]
Reflects [ty::ClosureKind
]
Reflects [hir::ConstArgKind
]
The subset of
Expr that corresponds to constants.
Reflects [hir::Constness
]
Reflects [hir::def::CtorKind
]
Reflects [hir::def::CtorOf
]
Reflects [rustc_hir::def::DefKind
]
Reflects [rustc_hir::definitions::DefPathData
]
Reflects [hir::Defaultness
]
Reflects [ty::DynKind
]
A predicate without Self
, for use in dyn Trait
.
Reflects [rustc_type_ir::FloatTy
]
Reflects [hir::FnRetTy
]
Reflects [hir::ForeignItemKind
]
Imbues [rustc_hir::def::DefKind
] with a lot of extra information.
Important: the owner_id()
must be the id of this definition.
A value of type fn<...> A -> B
that can be called.
Reflects [hir::GenericParamKind
]
The source of a particular trait implementation. Most often this is either Concrete
for a
concrete impl Trait for Type {}
item, or LocalBound
for a context-bound where T: Trait
.
Reflects [hir::ImplItemKind
], inlining the body of the items.
Reflects [hir::ImplicitSelfKind
]
Reflects partially [ty::InferTy
]
Reflects [rustc_attr::InlineAttr
]
Reflects [rustc_type_ir::IntTy
]
Reflects [hir::IsAsync
]
Reflects [hir::ItemKind
]
Reflects [hir::LifetimeParamKind
]
Reflects [hir::Movability
]
Reflects [hir::def::NonMacroAttrKind
]
Reflects [hir::OpaqueTyOrigin
]
Reflects [hir::ParamName
]
Reflects [hir::PrimTy
]
Reflects [hir::RangeEnd
]
Reflects [hir::def::Res
]
Reflects [hir::Safety
]
Reflects [rustc_middle::mir::ScopeData
]
Reflects [hir::TraitItemKind
]
Reflects [rustc_type_ir::UintTy
]
Reflects [hir::UseKind
]
Reflects [ty::Variance
]
Reflects [hir::VariantData
]
Describe the kind of a variant
Gets the closest ancestor of id
that is the id of a type.
Gets the kind of the definition.
Gets the attributes of the definition.
The predicates that can be deduced from the presence of this item in a signature. We only
consider predicates implied by traits here, not implied bounds such as &'a T
implying T: 'a
.
Returns a list of type predicates for the definition with ID def_id
, including inferred
lifetime constraints. This is the basic list of predicates we use for essentially all items.
The predicates that must hold to mention this item.
Retrieve the Self: Trait
clause for a trait associated item.
The special “self” predicate on a trait.
Solve the trait obligations for implementing a trait (or for trait associated type bounds) in
the current context.
Solve the trait obligations for a specific item use (for example, a method call, an ADT, etc.)
in the current context.
This is the entrypoint of the solving.
Given a clause clause
in the context of some impl block impl_did
, susbts correctly Self
from clause
and (1) derive a Clause
and (2) resolve an ImplExpr
.