Skip to content

Commit 7a1a456

Browse files
authored
Rollup merge of #122935 - RalfJung:with-exposed-provenance, r=Amanieu
rename ptr::from_exposed_addr -> ptr::with_exposed_provenance As discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/To.20expose.20or.20not.20to.20expose/near/427757066). The old name, `from_exposed_addr`, makes little sense as it's not the address that is exposed, it's the provenance. (`ptr.expose_addr()` stays unchanged as we haven't found a better option yet. The intended interpretation is "expose the provenance and return the address".) The new name nicely matches `ptr::without_provenance`.
2 parents 79a1bdd + 9055501 commit 7a1a456

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ fn codegen_stmt<'tcx>(
650650
| CastKind::FnPtrToPtr
651651
| CastKind::PtrToPtr
652652
| CastKind::PointerExposeAddress
653-
| CastKind::PointerFromExposedAddress,
653+
| CastKind::PointerWithExposedProvenance,
654654
ref operand,
655655
to_ty,
656656
) => {

src/intrinsics/simd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
965965
});
966966
}
967967

968-
sym::simd_expose_addr | sym::simd_from_exposed_addr | sym::simd_cast_ptr => {
968+
sym::simd_expose_addr | sym::simd_with_exposed_provenance | sym::simd_cast_ptr => {
969969
intrinsic_args!(fx, args => (arg); intrinsic);
970970
ret.write_cvalue_transmute(fx, arg);
971971
}

0 commit comments

Comments
 (0)