@@ -43,52 +43,44 @@ macro_rules! span_bug {
43
43
44
44
#[ macro_export]
45
45
macro_rules! CloneLiftImpls {
46
- ( for <$tcx : lifetime> { $ ( $ty: ty, ) + } ) => {
46
+ ( $ ( $ty: ty, ) +) => {
47
47
$(
48
- impl <$ tcx> $crate:: ty:: Lift <$ tcx> for $ty {
48
+ impl <' tcx> $crate:: ty:: Lift <' tcx> for $ty {
49
49
type Lifted = Self ;
50
- fn lift_to_tcx( self , _: $crate:: ty:: TyCtxt <$ tcx>) -> Option <Self > {
50
+ fn lift_to_tcx( self , _: $crate:: ty:: TyCtxt <' tcx>) -> Option <Self > {
51
51
Some ( self )
52
52
}
53
53
}
54
54
) +
55
55
} ;
56
-
57
- ( $( $ty: ty, ) +) => {
58
- CloneLiftImpls ! {
59
- for <' tcx> {
60
- $( $ty, ) +
61
- }
62
- }
63
- } ;
64
56
}
65
57
66
58
/// Used for types that are `Copy` and which **do not care arena
67
59
/// allocated data** (i.e., don't need to be folded).
68
60
#[ macro_export]
69
61
macro_rules! TrivialTypeTraversalImpls {
70
- ( for <$tcx : lifetime> { $ ( $ty: ty, ) + } ) => {
62
+ ( $ ( $ty: ty, ) +) => {
71
63
$(
72
- impl <$ tcx> $crate:: ty:: fold:: TypeFoldable <$crate:: ty:: TyCtxt <$ tcx>> for $ty {
73
- fn try_fold_with<F : $crate:: ty:: fold:: FallibleTypeFolder <$crate:: ty:: TyCtxt <$ tcx>>>(
64
+ impl <' tcx> $crate:: ty:: fold:: TypeFoldable <$crate:: ty:: TyCtxt <' tcx>> for $ty {
65
+ fn try_fold_with<F : $crate:: ty:: fold:: FallibleTypeFolder <$crate:: ty:: TyCtxt <' tcx>>>(
74
66
self ,
75
67
_: & mut F ,
76
68
) -> :: std:: result:: Result <Self , F :: Error > {
77
69
Ok ( self )
78
70
}
79
71
80
72
#[ inline]
81
- fn fold_with<F : $crate:: ty:: fold:: TypeFolder <$crate:: ty:: TyCtxt <$ tcx>>>(
73
+ fn fold_with<F : $crate:: ty:: fold:: TypeFolder <$crate:: ty:: TyCtxt <' tcx>>>(
82
74
self ,
83
75
_: & mut F ,
84
76
) -> Self {
85
77
self
86
78
}
87
79
}
88
80
89
- impl <$ tcx> $crate:: ty:: visit:: TypeVisitable <$crate:: ty:: TyCtxt <$ tcx>> for $ty {
81
+ impl <' tcx> $crate:: ty:: visit:: TypeVisitable <$crate:: ty:: TyCtxt <' tcx>> for $ty {
90
82
#[ inline]
91
- fn visit_with<F : $crate:: ty:: visit:: TypeVisitor <$crate:: ty:: TyCtxt <$ tcx>>>(
83
+ fn visit_with<F : $crate:: ty:: visit:: TypeVisitor <$crate:: ty:: TyCtxt <' tcx>>>(
92
84
& self ,
93
85
_: & mut F )
94
86
-> :: std:: ops:: ControlFlow <F :: BreakTy >
@@ -98,14 +90,6 @@ macro_rules! TrivialTypeTraversalImpls {
98
90
}
99
91
) +
100
92
} ;
101
-
102
- ( $( $ty: ty, ) +) => {
103
- TrivialTypeTraversalImpls ! {
104
- for <' tcx> {
105
- $( $ty, ) +
106
- }
107
- }
108
- } ;
109
93
}
110
94
111
95
#[ macro_export]
0 commit comments