From 4dc5d457d86f7414b1a2b4d81bf7428b3ffcbb34 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 1 Jun 2022 13:24:44 -0400 Subject: rename PointerAddress → PointerExposeAddress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compiler/rustc_const_eval/src/interpret/cast.rs | 6 +++--- compiler/rustc_const_eval/src/transform/check_consts/check.rs | 2 +- compiler/rustc_const_eval/src/transform/promote_consts.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_const_eval') 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, _) => { -- cgit 1.4.1-3-g733a5