@@ -61,7 +61,7 @@ pub fn eval_body_with_mir<'a, 'mir, 'tcx>(
6161 mir : & ' mir mir:: Mir < ' tcx > ,
6262 param_env : ty:: ParamEnv < ' tcx > ,
6363) -> Option < ( Value , Pointer , Ty < ' tcx > ) > {
64- let ( res, ecx, _ ) = eval_body_and_ecx ( tcx, cid, Some ( mir) , param_env) ;
64+ let ( res, ecx) = eval_body_and_ecx ( tcx, cid, Some ( mir) , param_env) ;
6565 match res {
6666 Ok ( val) => Some ( val) ,
6767 Err ( mut err) => {
@@ -76,7 +76,7 @@ pub fn eval_body<'a, 'tcx>(
7676 cid : GlobalId < ' tcx > ,
7777 param_env : ty:: ParamEnv < ' tcx > ,
7878) -> Option < ( Value , Pointer , Ty < ' tcx > ) > {
79- let ( res, ecx, _ ) = eval_body_and_ecx ( tcx, cid, None , param_env) ;
79+ let ( res, ecx) = eval_body_and_ecx ( tcx, cid, None , param_env) ;
8080 match res {
8181 Ok ( val) => Some ( val) ,
8282 Err ( mut err) => {
@@ -91,7 +91,7 @@ fn eval_body_and_ecx<'a, 'mir, 'tcx>(
9191 cid : GlobalId < ' tcx > ,
9292 mir : Option < & ' mir mir:: Mir < ' tcx > > ,
9393 param_env : ty:: ParamEnv < ' tcx > ,
94- ) -> ( EvalResult < ' tcx , ( Value , Pointer , Ty < ' tcx > ) > , EvalContext < ' a , ' mir , ' tcx , CompileTimeEvaluator > , Span ) {
94+ ) -> ( EvalResult < ' tcx , ( Value , Pointer , Ty < ' tcx > ) > , EvalContext < ' a , ' mir , ' tcx , CompileTimeEvaluator > ) {
9595 debug ! ( "eval_body: {:?}, {:?}" , cid, param_env) ;
9696 let mut ecx = EvalContext :: new ( tcx, param_env, CompileTimeEvaluator , ( ) ) ;
9797 // we start out with the best span we have
@@ -155,7 +155,7 @@ fn eval_body_and_ecx<'a, 'mir, 'tcx>(
155155 } ;
156156 Ok ( ( value, ptr, layout. ty ) )
157157 } ) ( ) ;
158- ( res, ecx, span )
158+ ( res, ecx)
159159}
160160
161161pub struct CompileTimeEvaluator ;
@@ -367,7 +367,6 @@ pub fn const_val_field<'a, 'tcx>(
367367 tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
368368 param_env : ty:: ParamEnv < ' tcx > ,
369369 instance : ty:: Instance < ' tcx > ,
370- span : Span ,
371370 variant : Option < usize > ,
372371 field : mir:: Field ,
373372 value : Value ,
@@ -403,7 +402,7 @@ pub fn const_val_field<'a, 'tcx>(
403402 ty,
404403 } ) ) ,
405404 Err ( err) => {
406- let trace = ecx. generate_stacktrace ( None ) ;
405+ let ( trace, span ) = ecx. generate_stacktrace ( None ) ;
407406 let err = ErrKind :: Miri ( err, trace) ;
408407 Err ( ConstEvalErr {
409408 kind : err. into ( ) ,
@@ -490,7 +489,7 @@ pub fn const_eval_provider<'a, 'tcx>(
490489 }
491490 } ;
492491
493- let ( res, ecx, span ) = eval_body_and_ecx ( tcx, cid, None , key. param_env ) ;
492+ let ( res, ecx) = eval_body_and_ecx ( tcx, cid, None , key. param_env ) ;
494493 res. map ( |( miri_value, _, miri_ty) | {
495494 tcx. mk_const ( ty:: Const {
496495 val : ConstVal :: Value ( miri_value) ,
@@ -500,7 +499,7 @@ pub fn const_eval_provider<'a, 'tcx>(
500499 if tcx. is_static ( def_id) . is_some ( ) {
501500 ecx. report ( & mut err, true , None ) ;
502501 }
503- let trace = ecx. generate_stacktrace ( None ) ;
502+ let ( trace, span ) = ecx. generate_stacktrace ( None ) ;
504503 let err = ErrKind :: Miri ( err, trace) ;
505504 ConstEvalErr {
506505 kind : err. into ( ) ,
0 commit comments