-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
fn main() {
dbg!(u16::from_bytes_le([21, 37]));
}
Current output
error[E0599]: no function or associated item named `from_bytes_le` found for type `u16` in the current scope
--> src/main.rs:2:15
|
2 | dbg!(u16::from_bytes_le([21, 37]));
| ^^^^^^^^^^^^^ function or associated item not found in `u16`
|
help: there is an associated function `from_be` with a similar name
|
2 - dbg!(u16::from_bytes_le([21, 37]));
2 + dbg!(u16::from_be([21, 37]));
|
Desired output
error[E0599]: no function or associated item named `from_bytes_le` found for type `u16` in the current scope
--> src/main.rs:2:15
|
2 | dbg!(u16::from_bytes_le([21, 37]));
| ^^^^^^^^^^^^^ function or associated item not found in `u16`
|
help: there is an associated function `from_le_bytes` with a similar name
|
2 - dbg!(u16::from_bytes_le([21, 37]));
2 + dbg!(u16::from_le_bytes([21, 37]));
|
Rationale and extra context
No response
Other cases
Rust Version
current nightly on play.rust-lang.org
Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.