Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d4031d0
String.split_terminator: Add an example when using a slice of chars
sylvestre Sep 6, 2021
6189d0a
Fix stabilization version for `bindings_after_at`
camelid Oct 6, 2021
e7f0485
rustc_driver: Enable the `WARN` log level by default
hawkw Oct 7, 2021
eb67bf9
Update compiler/rustc_driver/src/lib.rs
hawkw Oct 7, 2021
0180302
demote `rustc_peek` traces look not user-facing
hawkw Oct 7, 2021
928c787
make them structured while i'm here
hawkw Oct 7, 2021
e00eac8
use structured fields in some existing warnings
hawkw Oct 7, 2021
b6f09a1
comma-related changes
hawkw Oct 7, 2021
0e79545
lol i forgot the syntax for my own crate's macros
hawkw Oct 7, 2021
84fc5db
bless warnings
hawkw Oct 8, 2021
82c974d
Fix minor std::thread documentation typo
marcelo-gonzalez Oct 8, 2021
4a565e5
Fix asm docs typo
asquared31415 Oct 8, 2021
8a4085d
Move read2_abbreviated function into read2.rs
Nicholas-Baron Oct 8, 2021
e27bfb6
Add #[must_use] to stdin/stdout/stderr locks
jkugelman Oct 9, 2021
54d807c
Add #[must_use] to string/char transformation methods
jkugelman Oct 9, 2021
2ec7588
Update library/core/src/num/mod.rs
jkugelman Oct 9, 2021
4a775e4
Rollup merge of #88707 - sylvestre:split_example, r=yaahc
matthiaskrgr Oct 9, 2021
6bd7a7f
Rollup merge of #89605 - camelid:fix-version, r=nagisa
matthiaskrgr Oct 9, 2021
55480f1
Rollup merge of #89634 - hawkw:eliza/enable-err-warn, r=oli-obk
matthiaskrgr Oct 9, 2021
95f2ce2
Rollup merge of #89678 - marcelo-gonzalez:master, r=joshtriplett
matthiaskrgr Oct 9, 2021
3840e1f
Rollup merge of #89684 - asquared31415:asm-doc-fix, r=joshtriplett
matthiaskrgr Oct 9, 2021
45ff2fb
Rollup merge of #89687 - Nicholas-Baron:move_read2_abbreviated, r=Mar…
matthiaskrgr Oct 9, 2021
90afb75
Rollup merge of #89693 - jkugelman:must-use-stdin-stdout-stderr-locks…
matthiaskrgr Oct 9, 2021
a2caa35
Rollup merge of #89694 - jkugelman:must-use-string-transforms, r=josh…
matthiaskrgr Oct 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add #[must_use] to stdin/stdout/stderr locks
  • Loading branch information
jkugelman committed Oct 9, 2021
commit e27bfb6e23774b61619b0d83a66e7f079c3ada37
3 changes: 3 additions & 0 deletions library/std/src/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ pub struct Stdin {
/// Ok(())
/// }
/// ```
#[must_use = "if unused stdin will immediately unlock"]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct StdinLock<'a> {
inner: MutexGuard<'a, BufReader<StdinRaw>>,
Expand Down Expand Up @@ -624,6 +625,7 @@ pub struct Stdout {
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
#[must_use = "if unused stdout will immediately unlock"]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct StdoutLock<'a> {
inner: ReentrantMutexGuard<'a, RefCell<LineWriter<StdoutRaw>>>,
Expand Down Expand Up @@ -907,6 +909,7 @@ pub struct Stderr {
/// When operating in a console, the Windows implementation of this stream does not support
/// non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return
/// an error.
#[must_use = "if unused stderr will immediately unlock"]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct StderrLock<'a> {
inner: ReentrantMutexGuard<'a, RefCell<StderrRaw>>,
Expand Down