Add eval prefix to clarify what the function does
This commit is contained in:
parent
27e438ad94
commit
4fdeb2da74
2 changed files with 3 additions and 3 deletions
|
|
@ -545,7 +545,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
|
|||
Move(ref place) =>
|
||||
self.eval_place_to_op(place, layout)?,
|
||||
|
||||
Constant(ref constant) => self.lazy_const_to_op(*constant.literal, layout)?,
|
||||
Constant(ref constant) => self.eval_lazy_const_to_op(*constant.literal, layout)?,
|
||||
};
|
||||
trace!("{:?}: {:?}", mir_op, *op);
|
||||
Ok(op)
|
||||
|
|
@ -562,7 +562,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
|
|||
}
|
||||
|
||||
// Used when Miri runs into a constant, and by CTFE.
|
||||
pub fn lazy_const_to_op(
|
||||
pub fn eval_lazy_const_to_op(
|
||||
&self,
|
||||
val: ty::LazyConst<'tcx>,
|
||||
layout: Option<TyLayout<'tcx>>,
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ impl<'a, 'mir, 'tcx> ConstPropagator<'a, 'mir, 'tcx> {
|
|||
source_info: SourceInfo,
|
||||
) -> Option<Const<'tcx>> {
|
||||
self.ecx.tcx.span = source_info.span;
|
||||
match self.ecx.lazy_const_to_op(*c.literal, None) {
|
||||
match self.ecx.eval_lazy_const_to_op(*c.literal, None) {
|
||||
Ok(op) => {
|
||||
Some((op, c.span))
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue