@@ -14,15 +14,15 @@ use stable_mir::{opaque, Opaque};
14
14
15
15
impl < ' tcx > Stable < ' tcx > for rustc_target:: abi:: VariantIdx {
16
16
type T = VariantIdx ;
17
- fn stable ( & self , _: & mut Tables < ' tcx > ) -> Self :: T {
17
+ fn stable ( & self , _: & mut Tables < ' _ > ) -> Self :: T {
18
18
VariantIdx :: to_val ( self . as_usize ( ) )
19
19
}
20
20
}
21
21
22
22
impl < ' tcx > Stable < ' tcx > for rustc_abi:: Endian {
23
23
type T = stable_mir:: target:: Endian ;
24
24
25
- fn stable ( & self , _tables : & mut Tables < ' tcx > ) -> Self :: T {
25
+ fn stable ( & self , _tables : & mut Tables < ' _ > ) -> Self :: T {
26
26
match self {
27
27
rustc_abi:: Endian :: Little => stable_mir:: target:: Endian :: Little ,
28
28
rustc_abi:: Endian :: Big => stable_mir:: target:: Endian :: Big ,
@@ -33,16 +33,16 @@ impl<'tcx> Stable<'tcx> for rustc_abi::Endian {
33
33
impl < ' tcx > Stable < ' tcx > for rustc_target:: abi:: TyAndLayout < ' tcx , ty:: Ty < ' tcx > > {
34
34
type T = TyAndLayout ;
35
35
36
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
36
+ fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
37
37
TyAndLayout { ty : self . ty . stable ( tables) , layout : self . layout . stable ( tables) }
38
38
}
39
39
}
40
40
41
41
impl < ' tcx > Stable < ' tcx > for rustc_target:: abi:: Layout < ' tcx > {
42
42
type T = Layout ;
43
43
44
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
45
- tables. layout_id ( * self )
44
+ fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
45
+ tables. layout_id ( tables . tcx . lift ( * self ) . unwrap ( ) )
46
46
}
47
47
}
48
48
@@ -51,7 +51,7 @@ impl<'tcx> Stable<'tcx>
51
51
{
52
52
type T = LayoutShape ;
53
53
54
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
54
+ fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
55
55
LayoutShape {
56
56
fields : self . fields . stable ( tables) ,
57
57
variants : self . variants . stable ( tables) ,
@@ -65,7 +65,7 @@ impl<'tcx> Stable<'tcx>
65
65
impl < ' tcx > Stable < ' tcx > for rustc_target:: abi:: call:: FnAbi < ' tcx , ty:: Ty < ' tcx > > {
66
66
type T = FnAbi ;
67
67
68
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
68
+ fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
69
69
assert ! ( self . args. len( ) >= self . fixed_count as usize ) ;
70
70
assert ! ( !self . c_variadic || matches!( self . conv, Conv :: C ) ) ;
71
71
FnAbi {
@@ -81,7 +81,7 @@ impl<'tcx> Stable<'tcx> for rustc_target::abi::call::FnAbi<'tcx, ty::Ty<'tcx>> {
81
81
impl < ' tcx > Stable < ' tcx > for rustc_target:: abi:: call:: ArgAbi < ' tcx , ty:: Ty < ' tcx > > {
82
82
type T = ArgAbi ;
83
83
84
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
84
+ fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
85
85
ArgAbi {
86
86
ty : self . layout . ty . stable ( tables) ,
87
87
layout : self . layout . layout . stable ( tables) ,
@@ -93,7 +93,7 @@ impl<'tcx> Stable<'tcx> for rustc_target::abi::call::ArgAbi<'tcx, ty::Ty<'tcx>>
93
93
impl < ' tcx > Stable < ' tcx > for rustc_target:: abi:: call:: Conv {
94
94
type T = CallConvention ;
95
95
96
- fn stable ( & self , _tables : & mut Tables < ' tcx > ) -> Self :: T {
96
+ fn stable ( & self , _tables : & mut Tables < ' _ > ) -> Self :: T {
97
97
match self {
98
98
Conv :: C => CallConvention :: C ,
99
99
Conv :: Rust => CallConvention :: Rust ,
@@ -122,7 +122,7 @@ impl<'tcx> Stable<'tcx> for rustc_target::abi::call::Conv {
122
122
impl < ' tcx > Stable < ' tcx > for rustc_target:: abi:: call:: PassMode {
123
123
type T = PassMode ;
124
124
125
- fn stable ( & self , _tables : & mut Tables < ' tcx > ) -> Self :: T {
125
+ fn stable ( & self , _tables : & mut Tables < ' _ > ) -> Self :: T {
126
126
match self {
127
127
rustc_target:: abi:: call:: PassMode :: Ignore => PassMode :: Ignore ,
128
128
rustc_target:: abi:: call:: PassMode :: Direct ( attr) => PassMode :: Direct ( opaque ( attr) ) ,
@@ -146,7 +146,7 @@ impl<'tcx> Stable<'tcx> for rustc_target::abi::call::PassMode {
146
146
impl < ' tcx > Stable < ' tcx > for rustc_abi:: FieldsShape < rustc_target:: abi:: FieldIdx > {
147
147
type T = FieldsShape ;
148
148
149
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
149
+ fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
150
150
match self {
151
151
rustc_abi:: FieldsShape :: Primitive => FieldsShape :: Primitive ,
152
152
rustc_abi:: FieldsShape :: Union ( count) => FieldsShape :: Union ( * count) ,
@@ -165,7 +165,7 @@ impl<'tcx> Stable<'tcx>
165
165
{
166
166
type T = VariantsShape ;
167
167
168
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
168
+ fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
169
169
match self {
170
170
rustc_abi:: Variants :: Single { index } => {
171
171
VariantsShape :: Single { index : index. stable ( tables) }
@@ -185,7 +185,7 @@ impl<'tcx> Stable<'tcx>
185
185
impl < ' tcx > Stable < ' tcx > for rustc_abi:: TagEncoding < rustc_target:: abi:: VariantIdx > {
186
186
type T = TagEncoding ;
187
187
188
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
188
+ fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
189
189
match self {
190
190
rustc_abi:: TagEncoding :: Direct => TagEncoding :: Direct ,
191
191
rustc_abi:: TagEncoding :: Niche { untagged_variant, niche_variants, niche_start } => {
@@ -202,7 +202,7 @@ impl<'tcx> Stable<'tcx> for rustc_abi::TagEncoding<rustc_target::abi::VariantIdx
202
202
impl < ' tcx > Stable < ' tcx > for rustc_abi:: Abi {
203
203
type T = ValueAbi ;
204
204
205
- fn stable ( & self , tables : & mut Tables < ' tcx > ) -> Self :: T {
205
+ fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
206
206
match * self {
207
207
rustc_abi:: Abi :: Uninhabited => ValueAbi :: Uninhabited ,
208
208
rustc_abi:: Abi :: Scalar ( scalar) => ValueAbi :: Scalar ( scalar. stable ( tables) ) ,
@@ -220,23 +220,23 @@ impl<'tcx> Stable<'tcx> for rustc_abi::Abi {
220
220
impl < ' tcx > Stable < ' tcx > for rustc_abi:: Size {
221
221
type T = Size ;
222
222
223
- fn stable ( & self , _tables : & mut Tables < ' tcx > ) -> Self :: T {
223
+ fn stable ( & self , _tables : & mut Tables < ' _ > ) -> Self :: T {
224
224
self . bytes_usize ( )
225
225
}
226
226
}
227
227
228
228
impl < ' tcx > Stable < ' tcx > for rustc_abi:: Align {
229
229
type T = Align ;
230
230
231
- fn stable ( & self , _tables : & mut Tables < ' tcx > ) -> Self :: T {
231
+ fn stable ( & self , _tables : & mut Tables < ' _ > ) -> Self :: T {
232
232
self . bytes ( )
233
233
}
234
234
}
235
235
236
236
impl < ' tcx > Stable < ' tcx > for rustc_abi:: Scalar {
237
237
type T = Opaque ;
238
238
239
- fn stable ( & self , _tables : & mut Tables < ' tcx > ) -> Self :: T {
239
+ fn stable ( & self , _tables : & mut Tables < ' _ > ) -> Self :: T {
240
240
opaque ( self )
241
241
}
242
242
}
0 commit comments