File tree 1 file changed +6
-5
lines changed
compiler/rustc_resolve/src/late
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
// ignore-tidy-filelength
2
- //! Name resolution for lifetimes.
2
+ //! Resolution of early vs late bound lifetimes.
3
3
//!
4
- //! Name resolution for lifetimes follows *much* simpler rules than the
5
- //! full resolve. For example, lifetime names are never exported or
6
- //! used between functions, and they operate in a purely top-down
7
- //! way. Therefore, we break lifetime name resolution into a separate pass.
4
+ //! Name resolution for lifetimes is performed on the AST and embedded into HIR. From this
5
+ //! information, typechecking needs to transform the lifetime parameters into bound lifetimes.
6
+ //! Lifetimes can be early-bound or late-bound. Construction of typechecking terms needs to visit
7
+ //! the types in HIR to identify late-bound lifetimes and assign their Debruijn indices. This file
8
+ //! is also responsible for assigning their semantics to implicit lifetimes in trait objects.
8
9
9
10
use rustc_ast:: walk_list;
10
11
use rustc_data_structures:: fx:: { FxHashSet , FxIndexMap , FxIndexSet } ;
You can’t perform that action at this time.
0 commit comments