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 ;
21use rustc_apfloat:: ieee:: { Double , Single } ;
32use rustc_apfloat:: Float ;
43use rustc_serialize:: { Decodable , Decoder , Encodable , Encoder } ;
@@ -192,11 +191,11 @@ impl ScalarInt {
192191 self . data == 0
193192 }
194193
195- pub ( crate ) fn ptr_sized_op < ' tcx > (
194+ pub ( crate ) fn ptr_sized_op < E > (
196195 self ,
197196 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 > {
200199 assert_eq ! ( u64 :: from( self . size) , dl. pointer_size. bytes( ) ) ;
201200 Ok ( Self :: try_from_uint ( f_int ( u64:: try_from ( self . data ) . unwrap ( ) ) ?, self . size ( ) ) . unwrap ( ) )
202201 }
You can’t perform that action at this time.
0 commit comments