From 74ac35bcabc9cc88ab881d89e7b066f42e9e96a2 Mon Sep 17 00:00:00 2001 From: Eduardo Pinho Date: Mon, 18 Feb 2019 14:14:54 +0000 Subject: [PATCH 1/2] Update why transmute_int_to_float is bad Fix #3550 --- clippy_lints/src/transmute.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/transmute.rs b/clippy_lints/src/transmute.rs index 56e1aa4a4e1..4ce54f9f87c 100644 --- a/clippy_lints/src/transmute.rs +++ b/clippy_lints/src/transmute.rs @@ -159,7 +159,7 @@ 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. /// From 8994466bfe8152f4b48aebda5324c57d7b370f10 Mon Sep 17 00:00:00 2001 From: Eduardo Pinho Date: Mon, 18 Feb 2019 15:09:34 +0000 Subject: [PATCH 2/2] Format `transmute_from_int_to_float` docs --- clippy_lints/src/transmute.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/transmute.rs b/clippy_lints/src/transmute.rs index 4ce54f9f87c..f39dc6f9b68 100644 --- a/clippy_lints/src/transmute.rs +++ b/clippy_lints/src/transmute.rs @@ -159,7 +159,8 @@ declare_clippy_lint! { /// **What it does:** Checks for transmutes from an integer to a float. /// -/// **Why is this bad?** Transmutes are dangerous and error-prone, whereas `from_bits` is intuitive and safe. +/// **Why is this bad?** Transmutes are dangerous and error-prone, whereas `from_bits` is intuitive +/// and safe. /// /// **Known problems:** None. ///