about summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-10-03 13:47:59 +0200
committerGitHub <noreply@github.com>2024-10-03 13:47:59 +0200
commitaedf14bb0c5bac2a75099dff13caec5247cbdc2d (patch)
treebf153ae8f4b58e9bb6d35eda4e46c15696f0f640 /library
parentc9b907a567d6c7e276910f77a86aa134d19da4ba (diff)
parent4b48d72eaa7f4d934f56bcf2b6d0348954977823 (diff)
downloadrust-aedf14bb0c5bac2a75099dff13caec5247cbdc2d.tar.gz
rust-aedf14bb0c5bac2a75099dff13caec5247cbdc2d.zip
Rollup merge of #131163 - JakenHerman:master, r=Nadrieril
Add `get_line` confusable to `Stdin::read_line()`

This pull request resolves https://github.com/rust-lang/rust/issues/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 https://github.com/JakenHerman/rust/pull/1.

---

**Testing**:
Run `./x.py test tests/ui/attributes/rustc_confusables_std_cases.rs`
Diffstat (limited to 'library')
-rw-r--r--library/std/src/io/stdio.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs
index 6de069a518e..bf242e715bd 100644
--- a/library/std/src/io/stdio.rs
+++ b/library/std/src/io/stdio.rs
@@ -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)
     }