mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 14:38:46 +00:00
Auto merge of #3783 - Enet4:patch-1, r=Manishearth
Update why transmute_int_to_float is bad As suggested in #3550, this PR changes the reason why using `transmute` from an integer to a float is not recommended. Effectively, `from_bits` uses `transmute` underneath, but the former is preferred.
This commit is contained in:
commit
2139fbdbe1
1 changed files with 2 additions and 1 deletions
|
@ -159,7 +159,8 @@ declare_clippy_lint! {
|
|||
|
||||
/// **What it does:** Checks for transmutes from an integer to a float.
|
||||
///
|
||||
/// **Why is this bad?** This might result in an invalid in-memory representation of a float.
|
||||
/// **Why is this bad?** Transmutes are dangerous and error-prone, whereas `from_bits` is intuitive
|
||||
/// and safe.
|
||||
///
|
||||
/// **Known problems:** None.
|
||||
///
|
||||
|
|
Loading…
Add table
Reference in a new issue