Module rustc_monomorphize::traits [−][src]
Expand description
Trait Resolution. See the rustc dev guide for more information on how this works.
Modules
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.
Candidate selection. See the rustc dev guide for more information on how this works.
Structs
A chalk environment and goal.
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.
The reason why we incurred this obligation; used for error reporting.
Enums
The result of trait evaluation. The order is important here as the evaluation of a list is the maximum of the evaluations.
Given the successful resolution of an obligation, the ImplSource
indicates where the impl comes from.
Reasons a method might not be object-safe.
Indicates that trait evaluation caused overflow and in which pass.
Depending on the stage of compilation, we want projection to be more or less conservative.
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. Foo in Option<Foo>).
Type Definitions
When performing resolution, it is typically the case that there can be one of three outcomes: