about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-08-06 17:26:29 +0200
committerGitHub <noreply@github.com>2023-08-06 17:26:29 +0200
commit13de58358301f1affe0d8fbdeb1f8e8bf8d5fe00 (patch)
treed4220fe0d4a72ec45cbd6afe6ea9f5b9783c8d33 /compiler/rustc_const_eval/src/interpret
parent92c04217bab4726319839d2fdae05c255c94e3a8 (diff)
parent6df546281bf8ffc39df9430aa1717656dfbbcf7a (diff)
downloadrust-13de58358301f1affe0d8fbdeb1f8e8bf8d5fe00.tar.gz
rust-13de58358301f1affe0d8fbdeb1f8e8bf8d5fe00.zip
Rollup merge of #114505 - ouz-a:cleanup_mir, r=RalfJung
Add documentation to has_deref

Documentation of `has_deref` needed some polish to be more clear about where it should be used and what's it's purpose.

cc https://github.com/rust-lang/rust/issues/114401

r? `@RalfJung`
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
-rw-r--r--compiler/rustc_const_eval/src/interpret/step.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/step.rs b/compiler/rustc_const_eval/src/interpret/step.rs
index 0ef5522729a..a6edc6fb363 100644
--- a/compiler/rustc_const_eval/src/interpret/step.rs
+++ b/compiler/rustc_const_eval/src/interpret/step.rs
@@ -247,7 +247,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
 
             AddressOf(_, place) => {
                 // Figure out whether this is an addr_of of an already raw place.
-                let place_base_raw = if place.has_deref() {
+                let place_base_raw = if place.is_indirect_first_projection() {
                     let ty = self.frame().body.local_decls[place.local].ty;
                     ty.is_unsafe_ptr()
                 } else {