1
Fork 0

Update file description.

This commit is contained in:
Camille GILLOT 2022-07-22 20:15:14 +02:00
parent 3c5048d2ec
commit 3148ea31eb

View file

@ -1,10 +1,11 @@
// ignore-tidy-filelength // ignore-tidy-filelength
//! Name resolution for lifetimes. //! Resolution of early vs late bound lifetimes.
//! //!
//! Name resolution for lifetimes follows *much* simpler rules than the //! Name resolution for lifetimes is performed on the AST and embedded into HIR. From this
//! full resolve. For example, lifetime names are never exported or //! information, typechecking needs to transform the lifetime parameters into bound lifetimes.
//! used between functions, and they operate in a purely top-down //! Lifetimes can be early-bound or late-bound. Construction of typechecking terms needs to visit
//! way. Therefore, we break lifetime name resolution into a separate pass. //! 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_ast::walk_list;
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet}; use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};