File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,11 @@ trait ResolverAstLoweringExt {
135
135
fn get_lifetime_res ( & self , id : NodeId ) -> Option < LifetimeRes > ;
136
136
fn take_extra_lifetime_params ( & mut self , id : NodeId ) -> Vec < ( Ident , NodeId , LifetimeRes ) > ;
137
137
fn decl_macro_kind ( & self , def_id : LocalDefId ) -> MacroKind ;
138
+ /// Record the map from `from` local def id to `to` local def id, on `generics_def_id_map`
139
+ /// field.
138
140
fn record_def_id_remap ( & mut self , from : LocalDefId , to : LocalDefId ) ;
141
+ /// Get the previously recorded `to` local def id given the `from` local def id, obtained using
142
+ /// `generics_def_id_map` field.
139
143
fn get_remapped_def_id ( & self , local_def_id : LocalDefId ) -> LocalDefId ;
140
144
}
141
145
Original file line number Diff line number Diff line change @@ -177,7 +177,10 @@ pub struct ResolverAstLowering {
177
177
pub label_res_map : NodeMap < ast:: NodeId > ,
178
178
/// Resolutions for lifetimes.
179
179
pub lifetimes_res_map : NodeMap < LifetimeRes > ,
180
- /// Mapping from generics def-id to RPIT copied generic def-id
180
+ /// Mapping from generics `def_id`s to TAIT generics `def_id`s.
181
+ /// For each captured lifetime (e.g., 'a), we create a new lifetime parameter that is a generic
182
+ /// defined on the TAIT, so we have type Foo<'a1> = ... and we establish a mapping in this
183
+ /// field from the original parameter 'a to the new parameter 'a1.
181
184
pub generics_def_id_map : Vec < FxHashMap < LocalDefId , LocalDefId > > ,
182
185
/// Lifetime parameters that lowering will have to introduce.
183
186
pub extra_lifetime_params_map : NodeMap < Vec < ( Ident , ast:: NodeId , LifetimeRes ) > > ,
You can’t perform that action at this time.
0 commit comments