Skip to content

Commit

Permalink
lint message wording
Browse files Browse the repository at this point in the history
Signed-off-by: J-ZhengLi <[email protected]>
  • Loading branch information
J-ZhengLi committed Jan 5, 2024
1 parent 8ecd683 commit e355780
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub(super) fn check_local<'tcx>(cx: &LateContext<'tcx>, local: &'tcx Local<'tcx>
);
diag.span_note(
MultiSpan::from_spans(visitor.unconstrained_lit_spans),
"unconstrained numeric literals happened here",
"unconstrained numeric literals defined here",
);
}
);
Expand Down
28 changes: 14 additions & 14 deletions tests/ui/guidelines/unconstrained_numeric_literal.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error: type of this numeric variable is unconstrained
LL | let x = 22;
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:12:17
|
LL | let x = 22;
Expand All @@ -22,7 +22,7 @@ error: type of this numeric variable is unconstrained
LL | let x = 22.0;
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:15:17
|
LL | let x = 22.0;
Expand All @@ -38,7 +38,7 @@ error: type of this numeric variable is unconstrained
LL | let x = [1, 2, 3];
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:17:18
|
LL | let x = [1, 2, 3];
Expand All @@ -54,7 +54,7 @@ error: type of this numeric variable is unconstrained
LL | let x = if true { (1, 2) } else { (3, 4) };
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:19:28
|
LL | let x = if true { (1, 2) } else { (3, 4) };
Expand All @@ -70,7 +70,7 @@ error: type of this numeric variable is unconstrained
LL | let x = if true { (1.0, 2, 3.0) } else { (3.0, 4, 5.0) };
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:21:28
|
LL | let x = if true { (1.0, 2, 3.0) } else { (3.0, 4, 5.0) };
Expand All @@ -86,7 +86,7 @@ error: type of this numeric variable is unconstrained
LL | let x = match 1 {
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:23:23
|
LL | let x = match 1 {
Expand All @@ -107,7 +107,7 @@ error: type of this numeric variable is unconstrained
LL | let x: _ = 1;
| ^^^^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:29:20
|
LL | let x: _ = 1;
Expand All @@ -123,7 +123,7 @@ error: type of this numeric variable is unconstrained
LL | let x = {
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:46:13
|
LL | 1
Expand All @@ -139,7 +139,7 @@ error: type of this numeric variable is unconstrained
LL | let y = 1;
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:44:21
|
LL | let y = 1;
Expand All @@ -155,7 +155,7 @@ error: type of this numeric variable is unconstrained
LL | let y = 1;
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:50:21
|
LL | let y = 1;
Expand All @@ -171,7 +171,7 @@ error: type of this numeric variable is unconstrained
LL | let y = 1;
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:56:21
|
LL | let y = 1;
Expand All @@ -187,7 +187,7 @@ error: type of this numeric variable is unconstrained
LL | inline!(let x = 22;);
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:68:25
|
LL | inline!(let x = 22;);
Expand All @@ -204,7 +204,7 @@ error: type of this numeric variable is unconstrained
LL | let x = vec![1, 2, 3];
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:84:18
|
LL | let x = vec![1, 2, 3];
Expand All @@ -220,7 +220,7 @@ error: type of this numeric variable is unconstrained
LL | let x = vec![1.0];
| ^
|
note: unconstrained numeric literals happened here
note: unconstrained numeric literals defined here
--> $DIR/unconstrained_numeric_literal.rs:86:18
|
LL | let x = vec![1.0];
Expand Down

0 comments on commit e355780

Please sign in to comment.