about summary refs log tree commit diff
path: root/clippy_lints/src/casts
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2023-02-12 08:51:33 +0100
committerSamuel Tardieu <sam@rfc1149.net>2023-02-12 08:56:21 +0100
commitd9dc1679f50344e60a69e4e7f93acb8081d009a4 (patch)
tree20975f79377e5e0ebfc55c7af10a1ac3559e841b /clippy_lints/src/casts
parent0f7558148c22e53cd4608773b56cdfa50dcdeac3 (diff)
downloadrust-d9dc1679f50344e60a69e4e7f93acb8081d009a4.tar.gz
rust-d9dc1679f50344e60a69e4e7f93acb8081d009a4.zip
cast_possible_truncation: issue proper help message
Diffstat (limited to 'clippy_lints/src/casts')
-rw-r--r--clippy_lints/src/casts/cast_possible_truncation.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/casts/cast_possible_truncation.rs b/clippy_lints/src/casts/cast_possible_truncation.rs
index f3f8b8d8798..823970e35ab 100644
--- a/clippy_lints/src/casts/cast_possible_truncation.rs
+++ b/clippy_lints/src/casts/cast_possible_truncation.rs
@@ -168,7 +168,7 @@ pub(super) fn check(
     let suggestion = format!("{cast_to_snip}::try_from({name_of_cast_from})");
 
     span_lint_and_then(cx, CAST_POSSIBLE_TRUNCATION, expr.span, &msg, |diag| {
-        diag.help("if this is intentional allow the lint with `#[allow(clippy::cast_precision_loss)]` ...");
+        diag.help("if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...");
         diag.span_suggestion_with_style(
             expr.span,
             "... or use `try_from` and handle the error accordingly",