diff --git a/library/alloc/src/io/read.rs b/library/alloc/src/io/read.rs index 1fe8417d90761..58d3e7005f288 100644 --- a/library/alloc/src/io/read.rs +++ b/library/alloc/src/io/read.rs @@ -84,7 +84,7 @@ use crate::vec::Vec; #[stable(feature = "rust1", since = "1.0.0")] #[doc(notable_trait)] #[cfg_attr(not(test), rustc_diagnostic_item = "IoRead")] -#[rustc_must_implement_one_of(read, read_buf)] +#[rustc_must_implement_one_of(read_buf, read)] // Keep this order, it's important for rust-analyzer (the preferred-to-implement method should come first). pub trait Read { /// Pull some bytes from this source into the specified buffer, returning /// how many bytes were read.