mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 01:25:15 +00:00
Reorder the methods in #[rustc_must_implement_one_of]
So that their order will be the preferred order for implementations (assuming implementing `read_buf()` is better), like @joshtriplett said in https://github.com/rust-lang/rust/pull/106643#issuecomment-5187934543.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user