We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2022ca3 commit 1e27541Copy full SHA for 1e27541
packages/std/src/memory.rs
@@ -96,7 +96,7 @@ where
96
///
97
/// This function requires the following invariants to be upheld:
98
/// - `length` is smaller or equal to `capacity`
99
- /// - The number of bytes allocated by the pointer must be equal to `capacity`
+ /// - The number of bytes allocated by the pointer must be equal to `capacity` (if the `Ownership` is `Owned`)
100
/// - The byte range covered by `length` must be initialized
101
/// - `ptr` is a non-null pointer
102
/// - If the generic `Ownership` parameter is set to `Owned`, the `ptr` must point to a memory region allocated by a `Vec`
0 commit comments