diff options
| author | bors <bors@rust-lang.org> | 2024-03-10 22:16:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-10 22:16:22 +0000 |
| commit | 76ee6fc926032c16a5706086922fc1125c061b70 (patch) | |
| tree | 6081c0ea7a3e3979b1193e4bdbe612aaeb4d7194 /library/std/src/io/mod.rs | |
| parent | 3b1717c052de4a2dbdd3badb0e7a885f40a8ad9e (diff) | |
| parent | 16ffeb208d67b2717bc6826d5310d326096bc27c (diff) | |
| download | rust-76ee6fc926032c16a5706086922fc1125c061b70.tar.gz rust-76ee6fc926032c16a5706086922fc1125c061b70.zip | |
Auto merge of #122312 - matthiaskrgr:rollup-0p8y7gg, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #122275 (disable OOM test in Miri) - #122276 (io::Read trait: make it more clear when we are adressing implementations vs callers) - #122277 (BorrowedCursor docs clarification) - #122286 (use Instance::expect_resolve() instead of unwraping Instance::resolve()) - #122290 (MIR printing: print the path of uneval'd const) - #122293 (diagnostics: Do not suggest using `#[unix_sigpipe]` without a value) - #122297 (bootstrap: document what the triples in 'Build' mean) - #122302 (docs: Correct ptr/ref verbiage in SliceIndex docs.) - #122304 (fix metadata for dyn-star in new solver) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/io/mod.rs')
| -rw-r--r-- | library/std/src/io/mod.rs | 17 |
1 files changed, 7 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 /// |
