Skip to content

Commit 8c5398a

Browse files
authored
Rollup merge of #143675 - hkBst:overflowing-1, r=oli-obk
improve lint doc text
2 parents 9ee9b0e + 43bc40f commit 8c5398a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

compiler/rustc_lint/src/types.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ declare_lint! {
5959
}
6060

6161
declare_lint! {
62-
/// The `overflowing_literals` lint detects literal out of range for its
63-
/// type.
62+
/// The `overflowing_literals` lint detects literals out of range for their type.
6463
///
6564
/// ### Example
6665
///
@@ -72,9 +71,9 @@ declare_lint! {
7271
///
7372
/// ### Explanation
7473
///
75-
/// It is usually a mistake to use a literal that overflows the type where
76-
/// it is used. Either use a literal that is within range, or change the
77-
/// type to be within the range of the literal.
74+
/// It is usually a mistake to use a literal that overflows its type
75+
/// Change either the literal or its type such that the literal is
76+
/// within the range of its type.
7877
OVERFLOWING_LITERALS,
7978
Deny,
8079
"literal out of range for its type"

0 commit comments

Comments
 (0)