mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-18 01:44:04 +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
@ -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…
Reference in New Issue
Block a user