@@ -20,7 +20,7 @@ use rustc::mir::visit::{Visitor, PlaceContext};
2020use rustc:: middle:: const_val:: ConstVal ;
2121use rustc:: ty:: { TyCtxt , self , Instance } ;
2222use rustc:: mir:: interpret:: { Value , PrimVal , GlobalId } ;
23- use interpret:: { eval_body_with_mir , mk_borrowck_eval_cx, ValTy } ;
23+ use interpret:: { eval_promoted , mk_borrowck_eval_cx, ValTy } ;
2424use transform:: { MirPass , MirSource } ;
2525use syntax:: codemap:: Span ;
2626use rustc:: ty:: subst:: Substs ;
@@ -161,7 +161,7 @@ impl<'b, 'a, 'tcx:'b> ConstPropagator<'b, 'a, 'tcx> {
161161 } ;
162162 // cannot use `const_eval` here, because that would require having the MIR
163163 // for the current function available, but we're producing said MIR right now
164- let ( value, _, ty) = eval_body_with_mir ( self . tcx , cid, self . mir , self . param_env ) ?;
164+ let ( value, _, ty) = eval_promoted ( self . tcx , cid, self . mir , self . param_env ) ?;
165165 let val = ( value, ty, c. span ) ;
166166 trace ! ( "evaluated {:?} to {:?}" , c, val) ;
167167 Some ( val)
0 commit comments