[][src]Module rustc_middle::traits

Trait Resolution. See the rustc dev guide for more information on how this works.

Re-exports

pub use self::select::EvaluationCache;
pub use self::select::EvaluationResult;
pub use self::select::OverflowError;
pub use self::select::SelectionCache;
pub use self::ObligationCauseCode::*;

Modules

chalk

Types required for Chalk-related queries

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 librustc_traits.

select

Candidate selection. See the rustc dev guide for more information on how this works.

specialization_graph
structural_impls

Structs

ChalkEnvironmentAndGoal

A chalk environment and goal.

ChalkRustInterner
DerivedObligationCause
IfExpressionCause
ImplSourceAutoImplData
ImplSourceBuiltinData
ImplSourceClosureData
ImplSourceDiscriminantKindData
ImplSourceFnPointerData
ImplSourceGeneratorData
ImplSourceObjectData
ImplSourceTraitAliasData
ImplSourceUserDefinedData

Identifies a particular impl in the source, along with a set of substitutions from the impl's type/lifetime parameters. The nested vector corresponds to the nested obligations attached to the impl's type parameters.

MatchExpressionArmCause
ObligationCause

The reason why we incurred this obligation; used for error reporting.

ObligationCauseData
UnifyReceiverContext

Enums

ImplSource

Given the successful resolution of an obligation, the ImplSource indicates where the impl comes from.

MethodViolationCode

Reasons a method might not be object-safe.

ObjectSafetyViolation
ObligationCauseCode
Reveal

Depending on the stage of compilation, we want projection to be more or less conservative.

SelectionError
StatementAsExpression

Constants

DUMMY_OBLIGATION_CAUSE_DATA

Type Definitions

CanonicalChalkEnvironmentAndGoal
SelectionResult

When performing resolution, it is typically the case that there can be one of three outcomes: