File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
compiler/rustc_middle/src/ty/consts Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
- use crate :: mir:: interpret:: InterpResult ;
2
1
use rustc_apfloat:: ieee:: { Double , Single } ;
3
2
use rustc_apfloat:: Float ;
4
3
use rustc_serialize:: { Decodable , Decoder , Encodable , Encoder } ;
@@ -192,11 +191,11 @@ impl ScalarInt {
192
191
self . data == 0
193
192
}
194
193
195
- pub ( crate ) fn ptr_sized_op < ' tcx > (
194
+ pub ( crate ) fn ptr_sized_op < E > (
196
195
self ,
197
196
dl : & TargetDataLayout ,
198
- f_int : impl FnOnce ( u64 ) -> InterpResult < ' tcx , u64 > ,
199
- ) -> InterpResult < ' tcx , Self > {
197
+ f_int : impl FnOnce ( u64 ) -> Result < u64 , E > ,
198
+ ) -> Result < Self , E > {
200
199
assert_eq ! ( u64 :: from( self . size) , dl. pointer_size. bytes( ) ) ;
201
200
Ok ( Self :: try_from_uint ( f_int ( u64:: try_from ( self . data ) . unwrap ( ) ) ?, self . size ( ) ) . unwrap ( ) )
202
201
}
You can’t perform that action at this time.
0 commit comments