@@ -136,7 +136,7 @@ pub struct LoweringContext<'a> {
136
136
/// When `is_collectin_in_band_lifetimes` is true, each lifetime is checked
137
137
/// against this list to see if it is already in-scope, or if a definition
138
138
/// needs to be created for it.
139
- in_scope_lifetimes : Vec < Ident > ,
139
+ in_scope_lifetimes : Vec < ParamName > ,
140
140
141
141
current_module : NodeId ,
142
142
@@ -865,7 +865,7 @@ impl<'a> LoweringContext<'a> {
865
865
return ;
866
866
}
867
867
868
- if self . in_scope_lifetimes . contains ( & ident. modern ( ) ) {
868
+ if self . in_scope_lifetimes . contains ( & ParamName :: Plain ( ident. modern ( ) ) ) {
869
869
return ;
870
870
}
871
871
@@ -899,7 +899,7 @@ impl<'a> LoweringContext<'a> {
899
899
{
900
900
let old_len = self . in_scope_lifetimes . len ( ) ;
901
901
let lt_def_names = params. iter ( ) . filter_map ( |param| match param. kind {
902
- GenericParamKind :: Lifetime { .. } => Some ( param. ident . modern ( ) ) ,
902
+ GenericParamKind :: Lifetime { .. } => Some ( ParamName :: Plain ( param. ident . modern ( ) ) ) ,
903
903
_ => None ,
904
904
} ) ;
905
905
self . in_scope_lifetimes . extend ( lt_def_names) ;
@@ -2267,10 +2267,14 @@ impl<'a> LoweringContext<'a> {
2267
2267
let lifetime_params: Vec < ( Span , ParamName ) > =
2268
2268
this. in_scope_lifetimes
2269
2269
. iter ( ) . cloned ( )
2270
- . map ( |ident | ( ident. span , ParamName :: Plain ( ident ) ) )
2270
+ . map ( |name | ( name . ident ( ) . span , name ) )
2271
2271
. chain ( this. lifetimes_to_define . iter ( ) . cloned ( ) )
2272
2272
. collect ( ) ;
2273
2273
2274
+ debug ! ( "lower_async_fn_ret_ty: in_scope_lifetimes={:#?}" , this. in_scope_lifetimes) ;
2275
+ debug ! ( "lower_async_fn_ret_ty: lifetimes_to_define={:#?}" , this. lifetimes_to_define) ;
2276
+ debug ! ( "lower_async_fn_ret_ty: lifetime_params={:#?}" , lifetime_params) ;
2277
+
2274
2278
let generic_params =
2275
2279
lifetime_params
2276
2280
. iter ( ) . cloned ( )
0 commit comments