Expand description
Trait resolution: given a trait reference, we track which local clause caused it to be true. This module is independent from the rest of hax, in particular it doesn’t use its state-tracking machinery.
Structs§
- Annotated
Trait Pred - Candidate 🔒
- A candidate projects
selfalong a path reaching some predicate. A candidate is selected when its predicate is the one expected, akatarget. - Impl
Expr - Predicate
Searcher - Stores a set of predicates along with where they came from.
Enums§
- Bound
Predicate Origin - Items have various predicates in scope.
path_touses them as a starting point for trait resolution. This tracks where each of them comes from. - Builtin
Trait Data - Destruct
Data - Impl
Expr Atom - Path
Chunk
Functions§
- initial_
self_ 🔒pred - Returns the predicate to resolve as
Self, if that makes sense in the current item. Currently this predicate is only used inside trait declarations and their asosciated types. - local_
bound_ 🔒predicates - The predicates to use as a starting point for resolving trait references within this item. This
includes the
required_predicatesof this item and all its parents. - parents_
trait_ 🔒predicates - shallow_
resolve_ trait_ ref - Attempts to resolve an obligation to an
ImplSource. The result is a shallowImplSourceresolution, meaning that we do not resolve all nested obligations on the impl. Note that type check should guarantee to us that all nested obligations could be resolved if we wanted to.