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:
bors 2019-02-18 20:05:54 +00:00
commit 2139fbdbe1

View file

@ -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.
///