summary refs log tree commit diff
path: root/compiler/rustc_const_eval
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-06-01 13:24:44 -0400
committerRalf Jung <post@ralfj.de>2022-06-01 14:08:17 -0400
commit4dc5d457d86f7414b1a2b4d81bf7428b3ffcbb34 (patch)
tree2e785fa382a33c6aa45d12b1bc8c6139123d2b5b /compiler/rustc_const_eval
parent395a09c3dafe0c7838c9ca41d2b47bb5e79a5b6d (diff)
downloadrust-4dc5d457d86f7414b1a2b4d81bf7428b3ffcbb34.tar.gz
rust-4dc5d457d86f7414b1a2b4d81bf7428b3ffcbb34.zip
rename PointerAddress → PointerExposeAddress
Diffstat (limited to 'compiler/rustc_const_eval')
-rw-r--r--compiler/rustc_const_eval/src/interpret/cast.rs6
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/check.rs2
-rw-r--r--compiler/rustc_const_eval/src/transform/promote_consts.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/cast.rs b/compiler/rustc_const_eval/src/interpret/cast.rs
index af563c1450e..520ae409e6b 100644
--- a/compiler/rustc_const_eval/src/interpret/cast.rs
+++ b/compiler/rustc_const_eval/src/interpret/cast.rs
@@ -31,9 +31,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
                 self.unsize_into(src, cast_ty, dest)?;
             }
 
-            PointerAddress => {
+            PointerExposeAddress => {
                 let src = self.read_immediate(src)?;
-                let res = self.pointer_address_cast(&src, cast_ty)?;
+                let res = self.pointer_expose_address_cast(&src, cast_ty)?;
                 self.write_immediate(res, dest)?;
             }
 
@@ -184,7 +184,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
         Ok(self.cast_from_int_like(scalar, src.layout, cast_ty)?.into())
     }
 
-    pub fn pointer_address_cast(
+    pub fn pointer_expose_address_cast(
         &mut self,
         src: &ImmTy<'tcx, M::PointerTag>,
         cast_ty: Ty<'tcx>,
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
index 4ef33d62a6b..c07680515f4 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -542,7 +542,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
                 // in the type of any local, which also excludes casts).
             }
 
-            Rvalue::Cast(CastKind::PointerAddress, _, _) => {
+            Rvalue::Cast(CastKind::PointerExposeAddress, _, _) => {
                 self.check_op(ops::RawPtrToIntCast);
             }
 
diff --git a/compiler/rustc_const_eval/src/transform/promote_consts.rs b/compiler/rustc_const_eval/src/transform/promote_consts.rs
index ea23bd14d25..cf5d7b6c70a 100644
--- a/compiler/rustc_const_eval/src/transform/promote_consts.rs
+++ b/compiler/rustc_const_eval/src/transform/promote_consts.rs
@@ -502,7 +502,7 @@ impl<'tcx> Validator<'_, 'tcx> {
             Rvalue::ThreadLocalRef(_) => return Err(Unpromotable),
 
             // ptr-to-int casts are not possible in consts and thus not promotable
-            Rvalue::Cast(CastKind::PointerAddress, _, _) => return Err(Unpromotable),
+            Rvalue::Cast(CastKind::PointerExposeAddress, _, _) => return Err(Unpromotable),
 
             // int-to-ptr casts are fine, they just use the integer value at pointer type.
             Rvalue::Cast(_, operand, _) => {