about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret/step.rs
diff options
context:
space:
mode:
authorBastian Kersting <bkersting@google.com>2025-01-24 14:08:30 +0000
committerBastian Kersting <bkersting@google.com>2025-02-10 12:49:18 +0000
commitf842ee824534e2dbf3c2976f8007890b2238e3c5 (patch)
tree51bc12d5f2dd54ce423969e556a32a433031b479 /compiler/rustc_const_eval/src/interpret/step.rs
parent80c091958f05e573433df974f8d2f2bc3a3eadfb (diff)
downloadrust-f842ee824534e2dbf3c2976f8007890b2238e3c5.tar.gz
rust-f842ee824534e2dbf3c2976f8007890b2238e3c5.zip
Rename rustc_middle::Ty::is_unsafe_ptr to is_raw_ptr
The wording unsafe pointer is less common and not mentioned in a lot of
places, instead this is usually called a "raw pointer". For the sake of
uniformity, we rename this method.
This came up during the review of
https://github.com/rust-lang/rust/pull/134424.
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/step.rs')
-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 abe73c43d8a..6a17da61c8b 100644
--- a/compiler/rustc_const_eval/src/interpret/step.rs
+++ b/compiler/rustc_const_eval/src/interpret/step.rs
@@ -241,7 +241,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
                 // Figure out whether this is an addr_of of an already raw place.
                 let place_base_raw = if place.is_indirect_first_projection() {
                     let ty = self.frame().body.local_decls[place.local].ty;
-                    ty.is_unsafe_ptr()
+                    ty.is_raw_ptr()
                 } else {
                     // Not a deref, and thus not raw.
                     false