Skip to content

Commit c0923c8

Browse files
committed
Add docs to generics_def_id_map
1 parent 5e71659 commit c0923c8

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_resolve/src

1 file changed

+4
-1
lines changed

compiler/rustc_resolve/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,10 @@ pub struct Resolver<'a> {
913913
label_res_map: NodeMap<NodeId>,
914914
/// Resolutions for lifetimes.
915915
lifetimes_res_map: NodeMap<LifetimeRes>,
916-
/// Mapping from generics def-id to RPIT copied generic def-id
916+
/// Mapping from generics `def_id`s to TAIT generics `def_id`s.
917+
/// For each captured lifetime (e.g., 'a), we create a new lifetime parameter that is a generic
918+
/// defined on the TAIT, so we have type Foo<'a1> = ... and we establish a mapping in this
919+
/// field from the original parameter 'a to the new parameter 'a1.
917920
generics_def_id_map: Vec<FxHashMap<LocalDefId, LocalDefId>>,
918921
/// Lifetime parameters that lowering will have to introduce.
919922
extra_lifetime_params_map: NodeMap<Vec<(Ident, NodeId, LifetimeRes)>>,

0 commit comments

Comments
 (0)