diff options
| author | bors <bors@rust-lang.org> | 2019-06-28 14:08:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-06-28 14:08:07 +0000 |
| commit | 433a46781544da61801400316e7e546f01b81952 (patch) | |
| tree | 7e2aa52a91f7af676fb2a73b88c4f5589f90a7ee /src/libstd | |
| parent | 3849a5f83b82258fd76a3ff64933b81d7efeffa1 (diff) | |
| parent | 65f1ff41d2174099744e4a22568707d29faeb46e (diff) | |
| download | rust-433a46781544da61801400316e7e546f01b81952.tar.gz rust-433a46781544da61801400316e7e546f01b81952.zip | |
Auto merge of #62192 - Centril:rollup-kssnlta, r=Centril
Rollup of 16 pull requests Successful merges: - #61878 (improve pinning projection docs) - #62043 (Remove `FnBox`) - #62067 (Add suggestion for missing `.await` keyword) - #62076 (Updated RELEASES.md for 1.36.0) - #62102 (call out explicitly that general read needs to be called with an initialized buffer) - #62106 (Add more tests for async/await) - #62124 (refactor lexer to use idiomatic borrowing) - #62131 (libsyntax: Fix some Clippy warnings) - #62152 (Don't ICE on item in `.await` expression) - #62154 (Remove old fixme) - #62155 (Add regression test for MIR drop generation in async loops) - #62156 (Update books) - #62160 (Remove outdated question_mark_macro_sep lint) - #62164 (save-analysis: use buffered writes) - #62171 (rustc: Retry SIGILL linker invocations) - #62176 (Update RLS) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/mod.rs | 11 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 917199f8ea8..3d0568c16cd 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -506,9 +506,18 @@ pub trait Read { /// /// No guarantees are provided about the contents of `buf` when this /// function is called, implementations cannot rely on any property of the - /// contents of `buf` being true. It is recommended that implementations + /// contents of `buf` being true. It is recommended that *implementations* /// only write data to `buf` instead of reading its contents. /// + /// Correspondingly, however, *callers* of this method may not assume any guarantees + /// about how the implementation uses `buf`. The trait is safe to implement, + // so it is possible that the code that's supposed to write to the buffer might also read + // from it. It is your responsibility to make sure that `buf` is initialized + /// before calling `read`. Calling `read` with an uninitialized `buf` (of the kind one + /// obtains via [`MaybeUninit<T>`]) is not safe, and can lead to undefined behavior. + /// + /// [`MaybeUninit<T>`]: ../mem/union.MaybeUninit.html + /// /// # Errors /// /// If this function encounters any form of I/O or other error, an error diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index e0ffc9ba92f..60e06139eba 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -262,7 +262,6 @@ #![feature(exhaustive_patterns)] #![feature(external_doc)] #![feature(fn_traits)] -#![feature(fnbox)] #![feature(generator_trait)] #![feature(hash_raw_entry)] #![feature(hashmap_internals)] |
