-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New lint: transmute-num-to-bytes #7803
Labels
A-lint
Area: New lints
Comments
@rustbot claim |
aDotInTheVoid
added a commit
to aDotInTheVoid/rust-clippy
that referenced
this issue
Oct 11, 2021
Closes rust-lang#7803 changelog: [`transmute_num_to_bytes`] new lint
aDotInTheVoid
added a commit
to aDotInTheVoid/rust-clippy
that referenced
this issue
Oct 11, 2021
Closes rust-lang#7803 changelog: [`transmute_num_to_bytes`] new lint
bors
added a commit
that referenced
this issue
Oct 13, 2021
Add lint transmute_num_to_bytes Closes #7803 changelog: [`transmute_num_to_bytes`] new lint
aDotInTheVoid
added a commit
to aDotInTheVoid/rust-clippy
that referenced
this issue
Oct 13, 2021
Closes rust-lang#7803 changelog: [`transmute_num_to_bytes`] new lint
bors
added a commit
that referenced
this issue
Oct 13, 2021
Add lint transmute_num_to_bytes Closes #7803 changelog: [`transmute_num_to_bytes`] new lint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What it does
Detect open coding of (primitive int/float).to_ne_bytes() with
transmute
Categories (optional)
What is the advantage of the recommended code over the original code
Clearer, Removes
unsafe
Drawbacks
None.
Example
Could be written as:
The text was updated successfully, but these errors were encountered: