about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-07-22 20:15:14 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-07-25 19:19:23 +0200
commit3148ea31ebd3defd5c33d61bc720a0a286883ad2 (patch)
tree254e2bde664e029e494d29fb80bc7b9a76de0de9 /compiler/rustc_resolve/src
parent3c5048d2eceb315341582093d2102786c8be38c9 (diff)
downloadrust-3148ea31ebd3defd5c33d61bc720a0a286883ad2.tar.gz
rust-3148ea31ebd3defd5c33d61bc720a0a286883ad2.zip
Update file description.
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late/lifetimes.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/rustc_resolve/src/late/lifetimes.rs b/compiler/rustc_resolve/src/late/lifetimes.rs
index 25049b8ffac..a7fd7c427c7 100644
--- a/compiler/rustc_resolve/src/late/lifetimes.rs
+++ b/compiler/rustc_resolve/src/late/lifetimes.rs
@@ -1,10 +1,11 @@
 // ignore-tidy-filelength
-//! Name resolution for lifetimes.
+//! Resolution of early vs late bound lifetimes.
 //!
-//! Name resolution for lifetimes follows *much* simpler rules than the
-//! full resolve. For example, lifetime names are never exported or
-//! used between functions, and they operate in a purely top-down
-//! way. Therefore, we break lifetime name resolution into a separate pass.
+//! Name resolution for lifetimes is performed on the AST and embedded into HIR.  From this
+//! information, typechecking needs to transform the lifetime parameters into bound lifetimes.
+//! Lifetimes can be early-bound or late-bound.  Construction of typechecking terms needs to visit
+//! the types in HIR to identify late-bound lifetimes and assign their Debruijn indices.  This file
+//! is also responsible for assigning their semantics to implicit lifetimes in trait objects.
 
 use rustc_ast::walk_list;
 use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};