diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-05-11 13:49:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-11 13:49:28 +0200 |
| commit | 0c2cee2e9db93ddb54086239009f617e7d2db951 (patch) | |
| tree | f11002a312b285316fcc55cf8529ac0087bcc96b | |
| parent | 2af6677de8062390b530373dc6b82468afaadd35 (diff) | |
| parent | f1f0734718b4413e22362ac31988259efb648311 (diff) | |
| download | rust-0c2cee2e9db93ddb54086239009f617e7d2db951.tar.gz rust-0c2cee2e9db93ddb54086239009f617e7d2db951.zip | |
Rollup merge of #95281 - pierwill:fix-85513, r=Dylan-DPC
Fix inaccurate function name in `rustc_const_eval` docs Looks to me like this fixes #85513. I had trouble making a intra-docs link to `eval_place_to_op` work, though...
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/operand.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/place.rs | 2 |
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, |
