Skip to content

Commit

Permalink
Rollup merge of rust-lang#95281 - pierwill:fix-85513, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Fix inaccurate function name in `rustc_const_eval` docs

Looks to me like this fixes rust-lang#85513. I had trouble making a intra-docs link to `eval_place_to_op` work, though...
  • Loading branch information
Dylan-DPC authored Mar 26, 2022
2 parents 5aac762 + 32b2a19 commit 79c5bed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_const_eval/src/interpret/operand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,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>,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,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`].
pub fn eval_place(
&mut self,
place: mir::Place<'tcx>,
Expand Down

0 comments on commit 79c5bed

Please sign in to comment.