about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-07-10 15:19:34 +0200
committerGitHub <noreply@github.com>2025-07-10 15:19:34 +0200
commit8c5398a7f7d2aa70d373d4fc4434d0df7f62c5a5 (patch)
tree0e64f0f47609f8a68c40fb6c27aa30906d791fd1
parent9ee9b0e0c2dbf238dd4424f60927972cea722e3f (diff)
parent43bc40f113e0e12e44b8aea3968ff6b9d7eb4582 (diff)
downloadrust-8c5398a7f7d2aa70d373d4fc4434d0df7f62c5a5.tar.gz
rust-8c5398a7f7d2aa70d373d4fc4434d0df7f62c5a5.zip
Rollup merge of #143675 - hkBst:overflowing-1, r=oli-obk
improve lint doc text
-rw-r--r--compiler/rustc_lint/src/types.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_lint/src/types.rs b/compiler/rustc_lint/src/types.rs
index e41bc8f852e..fc9d795cb23 100644
--- a/compiler/rustc_lint/src/types.rs
+++ b/compiler/rustc_lint/src/types.rs
@@ -59,8 +59,7 @@ declare_lint! {
 }
 
 declare_lint! {
-    /// The `overflowing_literals` lint detects literal out of range for its
-    /// type.
+    /// The `overflowing_literals` lint detects literals out of range for their type.
     ///
     /// ### Example
     ///
@@ -72,9 +71,9 @@ declare_lint! {
     ///
     /// ### Explanation
     ///
-    /// It is usually a mistake to use a literal that overflows the type where
-    /// it is used. Either use a literal that is within range, or change the
-    /// type to be within the range of the literal.
+    /// It is usually a mistake to use a literal that overflows its type
+    /// Change either the literal or its type such that the literal is
+    /// within the range of its type.
     OVERFLOWING_LITERALS,
     Deny,
     "literal out of range for its type"