Expand description
“Late resolution” is the pass that resolves most of names in a crate beside imports and macros. It runs when the crate is fully expanded and its module structure is fully built. So it just walks through the crate and resolves all the expressions, types, etc.
If you wonder why there’s no early.rs
, that’s because it’s split into three files -
build_reduced_graph.rs
, macros.rs
and imports.rs
.
Modules§
Structs§
- Binding
Info 🔒 - Diag
Metadata 🔒 - IsNever
Pattern 🔒 - Item
Info 🔒Collector - Walks the whole crate in DFS order, visiting each item, counting the declared number of lifetime generic parameters and function parameters.
- Late
Resolution 🔒Visitor - Lifetime
Rib 🔒 - Rib 🔒
- A single local scope.
- Unnecessary
Qualification 🔒 - Used for recording UnnecessaryQualification.
Enums§
- Alias
Possibility 🔒 - Anon
Const 🔒Kind - Describes whether an
AnonConst
is a type level const arg or some other form of anon const (i.e. inline consts or enum discriminants) - Constant
HasGenerics 🔒 - May this constant have generics?
- Constant
Item 🔒Kind - HasGeneric
Params 🔒 - Does this the item (from the item rib scope) allow generic parameters?
- IsRepeat
Expr 🔒 - Lifetime
Binder 🔒Kind - Lifetime
RibKind 🔒 - Lifetime
UseSet 🔒 - Maybe
Exported 🔒 - At this point for most items we can answer whether that item is exported or not, but some items like impls require type information to determine exported-ness, so we make a conservative estimate for them (e.g. based on nominal visibility).
- NoConstant
Generics 🔒Reason - Reason for why an anon const is not allowed to reference generic parameters
- PatBound
Ctx 🔒 - Denotes whether the context for the set of already bound bindings is a
Product
orOr
context. This is used in e.g.,fresh_binding
andresolve_pattern_inner
. See those functions for more information. - Path
Source 🔒 - Pattern
Source 🔒 - Record
Partial 🔒Res - RibKind 🔒
- The rib kind restricts certain accesses,
e.g. to a
Res::Local
of an outer item.
Functions§
- def_
id_ 🔒matches_ path - Check if definition matches a path