Suggest {to,from}_ne_bytes
when people use transmute between arrays and integers
#136067
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
I see people doing this a bunch, like it just came up in Discord.
It would be nice to point them to the safe alternative when possible.
Other cases
Rust Version
Anything else?
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=a89dfdaa49736b9d106b2099ca48ddd7
The text was updated successfully, but these errors were encountered: