Skip to content

Commit 4fdeb2d

Browse files
committed
Add eval prefix to clarify what the function does
1 parent 27e438a commit 4fdeb2d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc_mir/interpret/operand.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
545545
Move(ref place) =>
546546
self.eval_place_to_op(place, layout)?,
547547

548-
Constant(ref constant) => self.lazy_const_to_op(*constant.literal, layout)?,
548+
Constant(ref constant) => self.eval_lazy_const_to_op(*constant.literal, layout)?,
549549
};
550550
trace!("{:?}: {:?}", mir_op, *op);
551551
Ok(op)
@@ -562,7 +562,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M>
562562
}
563563

564564
// Used when Miri runs into a constant, and by CTFE.
565-
pub fn lazy_const_to_op(
565+
pub fn eval_lazy_const_to_op(
566566
&self,
567567
val: ty::LazyConst<'tcx>,
568568
layout: Option<TyLayout<'tcx>>,

src/librustc_mir/transform/const_prop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ impl<'a, 'mir, 'tcx> ConstPropagator<'a, 'mir, 'tcx> {
253253
source_info: SourceInfo,
254254
) -> Option<Const<'tcx>> {
255255
self.ecx.tcx.span = source_info.span;
256-
match self.ecx.lazy_const_to_op(*c.literal, None) {
256+
match self.ecx.eval_lazy_const_to_op(*c.literal, None) {
257257
Ok(op) => {
258258
Some((op, c.span))
259259
},

0 commit comments

Comments
 (0)