Skip to content

impl Read for &Stdin is missing #95622

New issue

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

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

Already on GitHub? # to your account

Closed
RalfJung opened this issue Apr 3, 2022 · 5 comments · Fixed by #99153
Closed

impl Read for &Stdin is missing #95622

RalfJung opened this issue Apr 3, 2022 · 5 comments · Fixed by #99153
Assignees
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

RalfJung commented Apr 3, 2022

It is possible to write to a &Stdout thanks to impl Write for &Stdout, but it is not possible to read from a &Stdin as the corresponding impl Read for &Stdin is missing. This seems to be entirely an accident, given that read_line does work on &Stdin.

Cc @rust-lang/libs-api

@joshtriplett
Copy link
Member

Seems reasonable to me.

We'd need to FCP the resulting PR, since trait impls are insta-stable.

@RalfJung RalfJung added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` labels Apr 4, 2022
@Rustin170506

This comment was marked as outdated.

@Rustin170506

This comment was marked as outdated.

@Rustin170506 Rustin170506 removed their assignment Apr 12, 2022
@kckeiks
Copy link
Contributor

kckeiks commented Apr 12, 2022

@rustbot claim

@Dajamante
Copy link
Contributor

@rustbot claim

@rustbot rustbot assigned Dajamante and unassigned kckeiks Jul 4, 2022
jhpratt added a commit to jhpratt/rust that referenced this issue Mar 9, 2024
@bors bors closed this as completed in 0a8ea93 Mar 9, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 9, 2024
Rollup merge of rust-lang#99153 - Dajamante:issue/95622, r=dtolnay

Add Read Impl for &Stdin

r? `@oli-obk`
fixes rust-lang#95622
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants