diff options
| author | John Kugelman <john@kugelman.name> | 2021-10-30 22:58:27 -0400 | 
|---|---|---|
| committer | John Kugelman <john@kugelman.name> | 2021-10-30 23:44:02 -0400 | 
| commit | e129d49f88a69d4bb8cb0f45a0a674c17393f4e9 (patch) | |
| tree | b04e94e7af3aa049512a2dbdaa8ae8ca0c1583ff /library/std/src/io/stdio.rs | |
| parent | e249ce6b2345587d6e11052779c86adbad626dff (diff) | |
| download | rust-e129d49f88a69d4bb8cb0f45a0a674c17393f4e9.tar.gz rust-e129d49f88a69d4bb8cb0f45a0a674c17393f4e9.zip | |
Add #[must_use] to remaining std functions (A-N)
Diffstat (limited to 'library/std/src/io/stdio.rs')
| -rw-r--r-- | library/std/src/io/stdio.rs | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs index 9389501e012..f471693774c 100644 --- a/library/std/src/io/stdio.rs +++ b/library/std/src/io/stdio.rs @@ -301,6 +301,7 @@ pub struct StdinLock<'a> { /// Ok(()) /// } /// ``` +#[must_use] #[stable(feature = "rust1", since = "1.0.0")] pub fn stdin() -> Stdin { static INSTANCE: SyncOnceCell<Mutex<BufReader<StdinRaw>>> = SyncOnceCell::new(); @@ -673,6 +674,7 @@ static STDOUT: SyncOnceCell<ReentrantMutex<RefCell<LineWriter<StdoutRaw>>>> = Sy /// Ok(()) /// } /// ``` +#[must_use] #[stable(feature = "rust1", since = "1.0.0")] pub fn stdout() -> Stdout { Stdout { @@ -953,6 +955,7 @@ pub struct StderrLock<'a> { /// Ok(()) /// } /// ``` +#[must_use] #[stable(feature = "rust1", since = "1.0.0")] pub fn stderr() -> Stderr { // Note that unlike `stdout()` we don't use `at_exit` here to register a | 
