Modules§
- inspect
- Data structure used to inspect trait solver behavior.
Structs§
- Accessed
Opaques - External
Constraints - External
Constraints Data - Additional constraints returned on success.
- Maybe
Info - Nested
Normalization Goals - NoSolution
- Rerun
NonErased - A bit like
NoSolution, but for functions that normally cannot fail unless they accessed opaues. (SeeTypingMode::ErasedNotCoherence). GettingOpaquesAccesseddoesn’t mean there truly is no solution. It just means that we want to bail out of the current query as fast as possible, possibly by returningNoSolutionif that’s fastest. This is okay because when you getOpaquesAccessedwe’re guaranteed that we’re going to retry this query in the original typing mode to get the correct answer. - Response
Enums§
- AdtDestructor
Kind - Indicates that a
impl Drop for Adtisconstor not. - Alias
Bound Kind - Builtin
Impl Source - Candidate
Preference Mode - Which trait candidates should be preferred over other candidates? By default, prefer where bounds over alias bounds. For marker traits, prefer alias bounds over where bounds.
- Certainty
- External
Region Constraints - Goal
Source - Why a specific goal has to be proven.
- Maybe
Cause - Why we failed to evaluate a goal.
- NoSolution
OrRerun NonErased - Opaque
Types Jank - Supporting not-yet-defined opaque types in HIR typeck is somewhat challenging. Ideally we’d normalize them to a new inference variable and just defer type inference which relies on the opaque until we’ve constrained the hidden type.
- Param
EnvSource - Rerun
Condition - Information about how we accessed opaque types This is what the trait solver does when each states is encountered:
- Rerun
Reason - Mainly for debugging, to keep track of the source of the rerunning
in
TypingMode::ErasedNotCoherence. - Sized
Trait Kind - Which sizedness trait -
Sized,MetaSized?PointeeSizedis omitted as it is removed during lowering. - Small
Copy List - Stalled
OnCoroutines - Visible
ForLeak Check - Whether the given region constraint should be considered/ignored for
leak check. In most part of the compiler, this should be
Yes, except for applying constraints from the nested goals in next-solver.Unreachableis used in places in which leak check isn’t done, e.g. borrowck.