@@ -176,33 +176,33 @@ impl<'tcx, Tag> Pointer<Tag> {
176176 Pointer { alloc_id, offset, tag }
177177 }
178178
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 {
180180 Pointer :: new_with_tag (
181181 self . alloc_id ,
182182 Size :: from_bytes ( cx. data_layout ( ) . wrapping_signed_offset ( self . offset . bytes ( ) , i) ) ,
183183 self . tag ,
184184 )
185185 }
186186
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 ) {
188188 let ( res, over) = cx. data_layout ( ) . overflowing_signed_offset ( self . offset . bytes ( ) , i) ;
189189 ( Pointer :: new_with_tag ( self . alloc_id , Size :: from_bytes ( res) , self . tag ) , over)
190190 }
191191
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 > {
193193 Ok ( Pointer :: new_with_tag (
194194 self . alloc_id ,
195195 Size :: from_bytes ( cx. data_layout ( ) . signed_offset ( self . offset . bytes ( ) , i) ?) ,
196196 self . tag ,
197197 ) )
198198 }
199199
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 ) {
201201 let ( res, over) = cx. data_layout ( ) . overflowing_offset ( self . offset . bytes ( ) , i. bytes ( ) ) ;
202202 ( Pointer :: new_with_tag ( self . alloc_id , Size :: from_bytes ( res) , self . tag ) , over)
203203 }
204204
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 > {
206206 Ok ( Pointer :: new_with_tag (
207207 self . alloc_id ,
208208 Size :: from_bytes ( cx. data_layout ( ) . offset ( self . offset . bytes ( ) , i. bytes ( ) ) ?) ,
0 commit comments