about summary refs log tree commit diff
diff options
context:
space:
mode:
authornavh <navarre.hebb@gmail.com>2022-12-06 19:05:49 +0100
committerxFrednet <xFrednet@gmail.com>2023-01-12 12:16:07 +0100
commitfcdd08badf90665832939ccd30dc6df3194dd8a4 (patch)
tree3de1306055396845a1e3d2b482e642a2a2874202
parent51aaba6e8cf50289d55f53ac85aab4c95d601439 (diff)
downloadrust-fcdd08badf90665832939ccd30dc6df3194dd8a4.tar.gz
rust-fcdd08badf90665832939ccd30dc6df3194dd8a4.zip
update `cast_possible_truncation` documentation
-rw-r--r--clippy_lints/src/casts/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/clippy_lints/src/casts/mod.rs b/clippy_lints/src/casts/mod.rs
index 38b1c5c1c7e..a9618ca06d6 100644
--- a/clippy_lints/src/casts/mod.rs
+++ b/clippy_lints/src/casts/mod.rs
@@ -80,12 +80,13 @@ declare_clippy_lint! {
     /// ### What it does
     /// Checks for casts between numerical types that may
     /// truncate large values. This is expected behavior, so the cast is `Allow` by
-    /// default.
+    /// default. It suggests user either explicitly ignore the lint,
+    /// or use `try_from()` and handle the truncation, default, or panic explicitly.
     ///
     /// ### Why is this bad?
     /// In some problem domains, it is good practice to avoid
     /// truncation. This lint can be activated to help assess where additional
-    /// checks could be beneficial, and suggests implementing TryFrom trait.
+    /// checks could be beneficial.
     ///
     /// ### Example
     /// ```rust