about summary refs log tree commit diff
path: root/library/std/src/os
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2024-04-02 20:37:39 -0400
committerGitHub <noreply@github.com>2024-04-02 20:37:39 -0400
commite9ef8e1efa387fa235d63c191492f63f70959348 (patch)
tree4935ba4905ceb6d899d6974c036f1f8277103cf2 /library/std/src/os
parent0697ee9af5a0493631606e5fbe80cc802a95eb23 (diff)
parentf2cff5ebb9ebc9712eec88dd5ec578f76efb33bc (diff)
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`.
Diffstat (limited to 'library/std/src/os')
-rw-r--r--library/std/src/os/xous/ffi.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/os/xous/ffi.rs b/library/std/src/os/xous/ffi.rs
index 7fe84db515c..e9a9f533720 100644
--- a/library/std/src/os/xous/ffi.rs
+++ b/library/std/src/os/xous/ffi.rs
@@ -389,7 +389,7 @@ pub(crate) unsafe fn map_memory<T>(
     let result = a0;
 
     if result == SyscallResult::MemoryRange as usize {
-        let start = core::ptr::from_exposed_addr_mut::<T>(a1);
+        let start = core::ptr::with_exposed_provenance_mut::<T>(a1);
         let len = a2 / core::mem::size_of::<T>();
         let end = unsafe { start.add(len) };
         Ok(unsafe { core::slice::from_raw_parts_mut(start, len) })