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

Stabilize std::io::read_to_string #100337

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

camelid
Copy link
Member

@camelid camelid commented Aug 9, 2022

Closes #80218. 🎉

This PR stabilizes the std::io::read_to_string function, with the following public API:

pub fn read_to_string<R: Read>(reader: R) -> Result<String>;

It's analogous to std::fs::read_to_string for files, but it works on anything that implements io::Read, including io::stdin().

See the tracking issue (#80218) or documentation for details.

@camelid camelid added the S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. label Aug 9, 2022
@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Aug 9, 2022
@rustbot
Copy link
Collaborator

rustbot commented Aug 9, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-highfive
Copy link
Collaborator

r? @thomcc

(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 Aug 9, 2022
@camelid
Copy link
Member Author

camelid commented Aug 9, 2022

@rustbot label +T-libs-api -T-libs

@rustbot rustbot added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 9, 2022
@camelid camelid marked this pull request as draft August 9, 2022 18:23
@camelid camelid removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2022
@JohnTitor JohnTitor marked this pull request as ready for review August 27, 2022 04:25
@JohnTitor JohnTitor added relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Aug 27, 2022
@JohnTitor
Copy link
Member

Now the FCP has been complete: #80218 (comment)

Let's go ahead :shipit:
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 27, 2022

📌 Commit c04568b has been approved by JohnTitor

It is now in the queue for this repository.

@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 Aug 27, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 27, 2022
…g, r=JohnTitor

Stabilize `std::io::read_to_string`

Closes rust-lang#80218. 🎉

**Blocked on FCP finishing**
@est31
Copy link
Member

est31 commented Aug 27, 2022

👋 Hello, I'm writing this comment in this stabilization PR to notify you, the authors of this PR, that #100591 has been merged, which implemented a change in how features are stabilized.

Your PR has been filed before the change, so will likely require modifications in order to comply with the new rules. I recommend you to:

  1. rebase the PR onto latest master, so that uses of the placeholder are possible.
  2. replace the version numbers in the PR with the placeholder CURRENT_RUSTC_VERSION. For language changes, this means the version numbers in accepted.rs (example: 4caedba). For library changes, this means the since fields (example e576a9b).

That's it! The CURRENT_RUSTC_VERSION placeholder will, as part of the release process, be replaced with the version number that the PR merged for. It can be used anywhere in rust-lang/rust, not just accepted.rs and the since fields.

If you have any questions, feel free to drop by the zulip stream, or ping me directly in this PR's thread. Thanks! 👋

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 28, 2022
…g, r=JohnTitor

Stabilize `std::io::read_to_string`

Closes rust-lang#80218. 🎉

This PR stabilizes the `std::io::read_to_string` function, with the following public API:

```rust
pub fn read_to_string<R: Read>(reader: R) -> Result<String>;
```

It's analogous to `std::fs::read_to_string` for files, but it works on anything that implements `io::Read`, including `io::stdin()`.

See the tracking issue (rust-lang#80218) or documentation for details.
@matthiaskrgr
Copy link
Member

@bors r- this need to be updated (see comment above)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 28, 2022
@camelid camelid force-pushed the stabilize-io_read_to_string branch from c04568b to 3b57a48 Compare August 28, 2022 20:21
@camelid camelid force-pushed the stabilize-io_read_to_string branch from 3b57a48 to 2df5afe Compare August 28, 2022 20:23
@camelid
Copy link
Member Author

camelid commented Aug 28, 2022

@bors r=JohnTitor

@bors
Copy link
Contributor

bors commented Aug 28, 2022

📌 Commit 2df5afe has been approved by JohnTitor

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 28, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Aug 29, 2022
…g, r=JohnTitor

Stabilize `std::io::read_to_string`

Closes rust-lang#80218. 🎉

This PR stabilizes the `std::io::read_to_string` function, with the following public API:

```rust
pub fn read_to_string<R: Read>(reader: R) -> Result<String>;
```

It's analogous to `std::fs::read_to_string` for files, but it works on anything that implements `io::Read`, including `io::stdin()`.

See the tracking issue (rust-lang#80218) or documentation for details.
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 29, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#98304 (Add MaybeUninit memset test)
 - rust-lang#98801 (Add a `File::create_new` constructor)
 - rust-lang#99821 (Remove separate indexing of early-bound regions)
 - rust-lang#100239 (remove an ineffective check in const_prop)
 - rust-lang#100337 (Stabilize `std::io::read_to_string`)
 - rust-lang#100819 (Make use of `[wrapping_]byte_{add,sub}`)
 - rust-lang#100934 (Remove a panicking branch from `fmt::builders::PadAdapter`)
 - rust-lang#101000 (Separate CountIsStar from CountIsParam in rustc_parse_format.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9f7e20b into rust-lang:master Aug 29, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 29, 2022
@camelid camelid deleted the stabilize-io_read_to_string branch September 2, 2022 04:40
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. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking Issue for std::io::read_to_string
8 participants