diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-02-16 14:54:02 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-02-16 14:56:07 +0100 |
| commit | 4fdeb2da747231b03f85786f4ef6ce04d88da864 (patch) | |
| tree | 71bd0fd04e1339067c841226b8ace330b0527588 | |
| parent | 27e438ad948f9e430281e77b0abe3885b64f3bd0 (diff) | |
| download | rust-4fdeb2da747231b03f85786f4ef6ce04d88da864.tar.gz rust-4fdeb2da747231b03f85786f4ef6ce04d88da864.zip | |
Add `eval` prefix to clarify what the function does
| -rw-r--r-- | src/librustc_mir/interpret/operand.rs | 4 | ||||
| -rw-r--r-- | src/librustc_mir/transform/const_prop.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs index 3ec042efb26..08f6667039a 100644 --- a/src/librustc_mir/interpret/operand.rs +++ b/src/librustc_mir/interpret/operand.rs @@ -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>>, diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index d69a5130b24..1acc7b6e0c5 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -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)) }, |
