about summary refs log tree commit diff
diff options
context:
space:
mode:
authorpierwill <pierwill@users.noreply.github.com>2022-03-24 13:37:18 -0500
committerpierwill <pierwill@users.noreply.github.com>2022-05-06 14:52:42 -0500
commitf1f0734718b4413e22362ac31988259efb648311 (patch)
treefd838668b82e4db7dc0ca0c4f910ca254d5543db
parente209e85e39b4851c3ec122a45ddeabe318b2d522 (diff)
downloadrust-f1f0734718b4413e22362ac31988259efb648311.tar.gz
rust-f1f0734718b4413e22362ac31988259efb648311.zip
Fix inaccurate function name in `rustc_const_eval` docs
-rw-r--r--compiler/rustc_const_eval/src/interpret/operand.rs4
-rw-r--r--compiler/rustc_const_eval/src/interpret/place.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs
index a8a5ac2f9d9..8926676e815 100644
--- a/compiler/rustc_const_eval/src/interpret/operand.rs
+++ b/compiler/rustc_const_eval/src/interpret/operand.rs
@@ -520,8 +520,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
         Ok(OpTy { op, layout: place.layout })
     }
 
-    // Evaluate a place with the goal of reading from it.  This lets us sometimes
-    // avoid allocations.
+    /// Evaluate a place with the goal of reading from it.  This lets us sometimes
+    /// avoid allocations.
     pub fn eval_place_to_op(
         &self,
         place: mir::Place<'tcx>,
diff --git a/compiler/rustc_const_eval/src/interpret/place.rs b/compiler/rustc_const_eval/src/interpret/place.rs
index df6e05bb13c..e23c6f2a954 100644
--- a/compiler/rustc_const_eval/src/interpret/place.rs
+++ b/compiler/rustc_const_eval/src/interpret/place.rs
@@ -625,7 +625,7 @@ where
     }
 
     /// Computes a place. You should only use this if you intend to write into this
-    /// place; for reading, a more efficient alternative is `eval_place_for_read`.
+    /// place; for reading, a more efficient alternative is `eval_place_to_op`.
     #[instrument(skip(self), level = "debug")]
     pub fn eval_place(
         &mut self,