Skip to content

Commit 3148ea3

Browse files
committed
Update file description.
1 parent 3c5048d commit 3148ea3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

compiler/rustc_resolve/src/late/lifetimes.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// ignore-tidy-filelength
2-
//! Name resolution for lifetimes.
2+
//! Resolution of early vs late bound lifetimes.
33
//!
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.
89
910
use rustc_ast::walk_list;
1011
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};

0 commit comments

Comments
 (0)