Skip to content

Commit 7bcc303

Browse files
authored
inout: fix safety pre-conditions list in InOutBufReserved::from_raw docs
1 parent 2afc28d commit 7bcc303

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

inout/src/reserved.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ impl<T> InOutBufReserved<'_, '_, T> {
5252
/// must be valid for both reads and writes for `out_len * mem::size_of::<T>()`
5353
/// many bytes.
5454
/// - `in_ptr` and `out_ptr` must be either equal or non-overlapping.
55+
/// - `in_len` must be less than or equal to `out_len` (i.e. `in_len <= out_len`).
5556
/// - If `in_ptr` and `out_ptr` are equal, then the memory referenced by
5657
/// them must not be accessed through any other pointer (not derived from
5758
/// the return value) for the duration of lifetime 'a. Both read and write

0 commit comments

Comments
 (0)