@@ -176,33 +176,33 @@ impl<'tcx, Tag> Pointer<Tag> {
176
176
Pointer { alloc_id, offset, tag }
177
177
}
178
178
179
- pub fn wrapping_signed_offset < C : HasDataLayout > ( self , i : i64 , cx : C ) -> Self {
179
+ pub fn wrapping_signed_offset ( self , i : i64 , cx : impl HasDataLayout ) -> Self {
180
180
Pointer :: new_with_tag (
181
181
self . alloc_id ,
182
182
Size :: from_bytes ( cx. data_layout ( ) . wrapping_signed_offset ( self . offset . bytes ( ) , i) ) ,
183
183
self . tag ,
184
184
)
185
185
}
186
186
187
- pub fn overflowing_signed_offset < C : HasDataLayout > ( self , i : i128 , cx : C ) -> ( Self , bool ) {
187
+ pub fn overflowing_signed_offset ( self , i : i128 , cx : impl HasDataLayout ) -> ( Self , bool ) {
188
188
let ( res, over) = cx. data_layout ( ) . overflowing_signed_offset ( self . offset . bytes ( ) , i) ;
189
189
( Pointer :: new_with_tag ( self . alloc_id , Size :: from_bytes ( res) , self . tag ) , over)
190
190
}
191
191
192
- pub fn signed_offset < C : HasDataLayout > ( self , i : i64 , cx : C ) -> EvalResult < ' tcx , Self > {
192
+ pub fn signed_offset ( self , i : i64 , cx : impl HasDataLayout ) -> EvalResult < ' tcx , Self > {
193
193
Ok ( Pointer :: new_with_tag (
194
194
self . alloc_id ,
195
195
Size :: from_bytes ( cx. data_layout ( ) . signed_offset ( self . offset . bytes ( ) , i) ?) ,
196
196
self . tag ,
197
197
) )
198
198
}
199
199
200
- pub fn overflowing_offset < C : HasDataLayout > ( self , i : Size , cx : C ) -> ( Self , bool ) {
200
+ pub fn overflowing_offset ( self , i : Size , cx : impl HasDataLayout ) -> ( Self , bool ) {
201
201
let ( res, over) = cx. data_layout ( ) . overflowing_offset ( self . offset . bytes ( ) , i. bytes ( ) ) ;
202
202
( Pointer :: new_with_tag ( self . alloc_id , Size :: from_bytes ( res) , self . tag ) , over)
203
203
}
204
204
205
- pub fn offset < C : HasDataLayout > ( self , i : Size , cx : C ) -> EvalResult < ' tcx , Self > {
205
+ pub fn offset ( self , i : Size , cx : impl HasDataLayout ) -> EvalResult < ' tcx , Self > {
206
206
Ok ( Pointer :: new_with_tag (
207
207
self . alloc_id ,
208
208
Size :: from_bytes ( cx. data_layout ( ) . offset ( self . offset . bytes ( ) , i. bytes ( ) ) ?) ,
0 commit comments