Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #[must_use] to stdin/stdout/stderr locks #89693

Merged

Conversation

jkugelman
Copy link
Contributor

@jkugelman jkugelman commented Oct 9, 2021

Affected methods:

std::io           fn stdin_locked() -> StdinLock<'static>;
std::io::Stdin    fn lock(&self) -> StdinLock<'_>;
std::io::Stdin    fn into_locked(self) -> StdinLock<'static>;
std::io           fn stdout_locked() -> StdoutLock<'static>;
std::io::Stdout   fn lock(&self) -> StdoutLock<'_>;
std::io::Stdout   fn into_locked(self) -> StdoutLock<'static>;
std::io           fn stderr_locked() -> StderrLock<'static>;
std::io::Stderr   fn lock(&self) -> StderrLock<'_>;
std::io::Stderr   fn into_locked(self) -> StderrLock<'static>;

Parent issue: #89692

@rust-highfive
Copy link
Collaborator

r? @dtolnay

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 9, 2021
@joshtriplett
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 9, 2021

📌 Commit e27bfb6 has been approved by joshtriplett

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 9, 2021
@joshtriplett joshtriplett added the relnotes Marks issues that should be documented in the release notes of the next release. label Oct 9, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 9, 2021
…err-locks, r=joshtriplett

Add #[must_use] to stdin/stdout/stderr locks

Affected methods:

```rust
std::io           fn stdin_locked() -> StdinLock<'static>;
std::io::Stdin    fn lock(&self) -> StdinLock<'_>;
std::io           fn stdout_locked() -> StdoutLock<'static>;
std::io::Stdout   fn lock(&self) -> StdoutLock<'_>;
std::io           fn stderr_locked() -> StderrLock<'static>;
std::io::Stderr   fn lock(&self) -> StderrLock<'_>;
```

Parent issue: rust-lang#89692
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2021
…askrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#88707 (String.split_terminator: Add an example when using a slice of chars)
 - rust-lang#89605 (Fix stabilization version for `bindings_after_at`)
 - rust-lang#89634 (rustc_driver: Enable the `WARN` log level by default)
 - rust-lang#89641 (make #[target_feature] work with `asm` register classes)
 - rust-lang#89678 (Fix minor std::thread documentation typo)
 - rust-lang#89684 (Fix asm docs typo)
 - rust-lang#89687 (Move `read2_abbreviated` function into read2.rs)
 - rust-lang#89693 (Add #[must_use] to stdin/stdout/stderr locks)
 - rust-lang#89694 (Add #[must_use] to string/char transformation methods)
 - rust-lang#89697 (Fix min LLVM version for bpf-types test)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ee80459 into rust-lang:master Oct 9, 2021
@rustbot rustbot added this to the 1.57.0 milestone Oct 9, 2021
@jkugelman jkugelman deleted the must-use-stdin-stdout-stderr-locks branch October 9, 2021 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants