@@ -7,19 +7,19 @@ pub fn lift_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::TokenStre
7
7
s. add_bounds ( synstructure:: AddBounds :: Generics ) ;
8
8
9
9
let tcx: syn:: Lifetime = parse_quote ! ( ' tcx) ;
10
- let newtcx: syn:: GenericParam = parse_quote ! ( ' __newtcx ) ;
10
+ let newtcx: syn:: GenericParam = parse_quote ! ( ' __lifted ) ;
11
11
12
12
let lifted = {
13
13
let ast = s. ast ( ) ;
14
14
let ident = & ast. ident ;
15
15
16
- // Replace `'tcx` lifetime by the `'__newtcx ` lifetime
16
+ // Replace `'tcx` lifetime by the `'__lifted ` lifetime
17
17
let ( _, generics, _) = ast. generics . split_for_impl ( ) ;
18
18
let mut generics : syn:: AngleBracketedGenericArguments = syn:: parse_quote!{ #generics } ;
19
19
for arg in generics. args . iter_mut ( ) {
20
20
match arg {
21
21
syn:: GenericArgument :: Lifetime ( l) if * l == tcx => {
22
- * arg = parse_quote ! ( ' __newtcx ) ;
22
+ * arg = parse_quote ! ( ' __lifted ) ;
23
23
} ,
24
24
syn:: GenericArgument :: Type ( t) => {
25
25
* arg = syn:: parse_quote!{ #t:: Lifted } ;
@@ -40,10 +40,10 @@ pub fn lift_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::TokenStre
40
40
} ) ;
41
41
42
42
s. add_impl_generic ( newtcx) ;
43
- s. bound_impl ( quote ! ( :: rustc:: ty:: Lift <' __newtcx >) , quote ! {
43
+ s. bound_impl ( quote ! ( :: rustc:: ty:: Lift <' __lifted >) , quote ! {
44
44
type Lifted = #lifted;
45
45
46
- fn lift_to_tcx( & self , __tcx: :: rustc:: ty:: TyCtxt <' __newtcx >) -> Option <#lifted> {
46
+ fn lift_to_tcx( & self , __tcx: :: rustc:: ty:: TyCtxt <' __lifted >) -> Option <#lifted> {
47
47
Some ( match * self { #body } )
48
48
}
49
49
} )
0 commit comments