Skip to content

Commit

Permalink
Rollup merge of rust-lang#131163 - JakenHerman:master, r=Nadrieril
Browse files Browse the repository at this point in the history
Add `get_line` confusable to `Stdin::read_line()`

This pull request resolves rust-lang#131091

---

I've updated tests for `tests/ui/attributes/rustc_confusables_std_cases` in order to verify this change is working as intended.

Before I submitted this pull request, I had a pull request to my local fork. If you're interested in seeing the conversation on that PR, go to JakenHerman#1.

---

**Testing**:
Run `./x.py test tests/ui/attributes/rustc_confusables_std_cases.rs`
  • Loading branch information
matthiaskrgr authored Oct 3, 2024
2 parents 6b57e57 + 254af0b commit 86fa474
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions std/src/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ impl Stdin {
/// in which case it will wait for the Enter key to be pressed before
/// continuing
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_confusables("get_line")]
pub fn read_line(&self, buf: &mut String) -> io::Result<usize> {
self.lock().read_line(buf)
}
Expand Down

0 comments on commit 86fa474

Please sign in to comment.