Skip to content

Commit 2022ca3

Browse files
committed
Remove non-dangling requirement
1 parent a16ca45 commit 2022ca3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/std/src/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ where
9898
/// - `length` is smaller or equal to `capacity`
9999
/// - The number of bytes allocated by the pointer must be equal to `capacity`
100100
/// - The byte range covered by `length` must be initialized
101-
/// - `ptr` is a non-dangling and non-null pointer
101+
/// - `ptr` is a non-null pointer
102102
/// - If the generic `Ownership` parameter is set to `Owned`, the `ptr` must point to a memory region allocated by a `Vec`
103103
unsafe fn from_parts(ptr: *const u8, capacity: usize, length: usize) -> Self {
104104
// Well, this technically violates pointer provenance rules.

0 commit comments

Comments
 (0)