diff options
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/io/mod.rs | 17 | ||||
| -rw-r--r-- | library/std/src/io/tests.rs | 2 |
2 files changed, 9 insertions, 10 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index 9a4a2301b6f..10bf9c51d16 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -692,10 +692,9 @@ pub trait Read { /// Callers have to ensure that no unchecked out-of-bounds accesses are possible even if /// `n > buf.len()`. /// - /// No guarantees are provided about the contents of `buf` when this - /// function is called, so implementations cannot rely on any property of the - /// contents of `buf` being true. It is recommended that *implementations* - /// only write data to `buf` instead of reading its contents. + /// *Implementations* of this method can make no assumptions about the contents of `buf` when + /// this function is called. It is recommended that implementations only write data to `buf` + /// instead of reading its contents. /// /// Correspondingly, however, *callers* of this method in unsafe code must not assume /// any guarantees about how the implementation uses `buf`. The trait is safe to implement, @@ -901,12 +900,10 @@ pub trait Read { /// This function reads as many bytes as necessary to completely fill the /// specified buffer `buf`. /// - /// No guarantees are provided about the contents of `buf` when this - /// function is called, so implementations cannot rely on any property of the - /// contents of `buf` being true. It is recommended that implementations - /// only write data to `buf` instead of reading its contents. The - /// documentation on [`read`] has a more detailed explanation on this - /// subject. + /// *Implementations* of this method can make no assumptions about the contents of `buf` when + /// this function is called. It is recommended that implementations only write data to `buf` + /// instead of reading its contents. The documentation on [`read`] has a more detailed + /// explanation of this subject. /// /// # Errors /// diff --git a/library/std/src/io/tests.rs b/library/std/src/io/tests.rs index c306de3039f..eb5d5988768 100644 --- a/library/std/src/io/tests.rs +++ b/library/std/src/io/tests.rs @@ -694,6 +694,8 @@ fn read_buf_full_read() { } #[test] +// Miri does not support signalling OOM +#[cfg_attr(miri, ignore)] // 64-bit only to be sure the allocator will fail fast on an impossible to satsify size #[cfg(target_pointer_width = "64")] fn try_oom_error() { |
