Skip to content

Commit 1e27541

Browse files
committed
Add notice about ownership
1 parent 2022ca3 commit 1e27541

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
@@ -96,7 +96,7 @@ where
9696
///
9797
/// This function requires the following invariants to be upheld:
9898
/// - `length` is smaller or equal to `capacity`
99-
/// - The number of bytes allocated by the pointer must be equal to `capacity`
99+
/// - The number of bytes allocated by the pointer must be equal to `capacity` (if the `Ownership` is `Owned`)
100100
/// - The byte range covered by `length` must be initialized
101101
/// - `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`

0 commit comments

Comments
 (0)