Skip to main content

Module traits

Module traits 

Source
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Β§

DerivedCause
DerivedHostCause
ImplDerivedCause
ImplDerivedHostCause
ImplSourceUserDefinedData
Identifies a particular impl in the source, along with a set of generic parameters 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.
ObligationCauseCodeHandle
A compact form of ObligationCauseCode.
PatternOriginExpr
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.
SignatureMismatchData

EnumsΒ§

AssocConstViolation
Reasons an associated const might not be dyn compatible.
BuiltinImplSource
CodegenObligationError
These are the error cases for codegen_select_candidate.
DynCompatibilityViolation
DynCompatibilityViolationSolution
ImplSource
Given the successful resolution of an obligation, the ImplSource indicates where the impl comes from.
IsConstable
Whether a value can be extracted into a const. Used for diagnostics around array repeat expressions.
MethodViolation
Reasons a method might not be dyn-compatible.
ObligationCauseCode
SelectionError
WellFormedLoc
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 AliasesΒ§

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