@@ -7,7 +7,7 @@ use syntax::symbol::sym;
77use rustc_apfloat:: ieee:: { Single , Double } ;
88use rustc_apfloat:: { Float , FloatConvert } ;
99use rustc:: mir:: interpret:: {
10- Scalar , InterpResult , Pointer , PointerArithmetic , InterpError ,
10+ Scalar , InterpResult , Pointer , PointerArithmetic ,
1111} ;
1212use rustc:: mir:: CastKind ;
1313
@@ -74,7 +74,6 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
7474 }
7575
7676 Pointer ( PointerCast :: ReifyFnPointer ) => {
77- use rustc:: mir:: interpret:: InvalidProgramInfo :: TooGeneric ;
7877 // The src operand does not matter, just its type
7978 match src. layout . ty . sty {
8079 ty:: FnDef ( def_id, substs) => {
@@ -86,7 +85,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
8685 self . param_env ,
8786 def_id,
8887 substs,
89- ) . ok_or_else ( || InterpError :: InvalidProgram ( TooGeneric ) . into ( ) ) ;
88+ ) . ok_or_else ( || inval ! ( TooGeneric ) . into ( ) ) ;
9089 let fn_ptr = self . memory . create_fn_alloc ( FnVal :: Instance ( instance?) ) ;
9190 self . write_scalar ( Scalar :: Ptr ( fn_ptr. into ( ) ) , dest) ?;
9291 }
0 commit comments