Expand description
Trait Resolution. See the rustc dev guide for more information on how this works.
Re-exportsΒ§
use std::borrow::Cow;πuse std::hash::Hash;πuse std::hash::Hash;πuse std::hash::Hasher;πuse std::sync::Arc;πuse rustc_errors::Applicability;πuse rustc_errors::Diag;πuse rustc_errors::ErrorGuaranteed;πuse rustc_hir as hir;πuse rustc_hir::HirId;πuse rustc_hir::def_id::DefId;πuse rustc_macros::Decodable;πuse rustc_macros::Encodable;πuse rustc_macros::StableHash;πuse rustc_macros::TyDecodable;πuse rustc_macros::TyEncodable;πuse rustc_macros::TypeFoldable;πuse rustc_macros::TypeVisitable;πuse rustc_span::def_id::CRATE_DEF_ID;πuse rustc_span::def_id::LocalDefId;πuse rustc_span::DUMMY_SP;πuse rustc_span::OrdSpan;πuse rustc_span::Span;πuse rustc_span::Symbol;πuse rustc_span::sym;πuse smallvec::SmallVec;πuse smallvec::smallvec;πuse thin_vec::ThinVec;πpub use self::select::EvaluationCache;pub use self::select::EvaluationResult;pub use self::select::OverflowError;pub use self::select::SelectionCache;use crate::mir::ConstraintCategory;πuse crate::ty::abstract_const::NotConstEvaluatable;πuse crate::ty;πuse crate::ty::AdtKind;πuse crate::ty::GenericArgs;πuse crate::ty::Ty;π
ModulesΒ§
- cache
- Cache for candidate selection.
- query
- Experimental types for the trait query interface. The methods
defined in this module are all based on canonicalization,
which makes a canonical query by replacing unbound inference
variables and regions, so that results can be reused more broadly.
The providers for the queries defined here can be found in
rustc_traits. - select
- Candidate selection. See the rustc dev guide for more information on how this works.
- solve
- specialization_
graph - structural_
impls π
StructsΒ§
- Derived
Cause - Derived
Host Cause - Impl
Derived Cause - Impl
Derived Host Cause - Impl
Source User Defined Data - Identifies a particular impl in the source, along with a set of
generic parameters from the implβs type/lifetime parameters. The
nestedvector corresponds to the nested obligations attached to the implβs type parameters. - Match
Expression ArmCause - Obligation
Cause - The reason why we incurred this obligation; used for error reporting.
- Obligation
Cause Code Handle - A compact form of
ObligationCauseCode. - Pattern
Origin Expr - Information about the origin expression of a pattern, relevant to diagnostics. Fields here refer to the scrutinee of a pattern. If the scrutinee isnβt given in the diagnostic, then this wonβt exist.
- Signature
Mismatch Data
EnumsΒ§
- Assoc
Const Violation - Reasons an associated const might not be dyn compatible.
- Builtin
Impl Source - Codegen
Obligation Error - These are the error cases for
codegen_select_candidate. - DynCompatibility
Violation - DynCompatibility
Violation Solution - Impl
Source - Given the successful resolution of an obligation, the
ImplSourceindicates where the impl comes from. - IsConstable
- Whether a value can be extracted into a const. Used for diagnostics around array repeat expressions.
- Method
Violation - Reasons a method might not be dyn-compatible.
- Obligation
Cause Code - Selection
Error - Well
Formed Loc - The βlocationβ at which we try to perform HIR-based wf checking.
This information is used to obtain an
hir::Ty, which we can walk in order to obtain precise spans for any βnestedβ types (e.g.FooinOption<Foo>).
Type AliasesΒ§
- Selection
Result - When performing resolution, it is typically the case that there can be one of three outcomes: