@@ -6,6 +6,18 @@ LL | Foo => {}
6
6
|
7
7
= note: `#[warn(bindings_with_variant_name)]` on by default
8
8
9
+ warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo`
10
+ --> $DIR/lint-uppercase-variables.rs:28:9
11
+ |
12
+ LL | let Foo = foo::Foo::Foo;
13
+ | ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
14
+
15
+ warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo`
16
+ --> $DIR/lint-uppercase-variables.rs:33:17
17
+ |
18
+ LL | fn in_param(Foo: foo::Foo) {}
19
+ | ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
20
+
9
21
warning: unused variable: `Foo`
10
22
--> $DIR/lint-uppercase-variables.rs:22:9
11
23
|
@@ -19,6 +31,18 @@ LL | #![warn(unused)]
19
31
| ^^^^^^
20
32
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
21
33
34
+ warning: unused variable: `Foo`
35
+ --> $DIR/lint-uppercase-variables.rs:28:9
36
+ |
37
+ LL | let Foo = foo::Foo::Foo;
38
+ | ^^^ help: consider prefixing with an underscore: `_Foo`
39
+
40
+ warning: unused variable: `Foo`
41
+ --> $DIR/lint-uppercase-variables.rs:33:17
42
+ |
43
+ LL | fn in_param(Foo: foo::Foo) {}
44
+ | ^^^ help: consider prefixing with an underscore: `_Foo`
45
+
22
46
error: structure field `X` should have a snake case name
23
47
--> $DIR/lint-uppercase-variables.rs:10:5
24
48
|
@@ -49,6 +73,18 @@ error: variable `Foo` should have a snake case name
49
73
LL | Foo => {}
50
74
| ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`
51
75
52
- error: aborting due to 4 previous errors
76
+ error: variable `Foo` should have a snake case name
77
+ --> $DIR/lint-uppercase-variables.rs:28:9
78
+ |
79
+ LL | let Foo = foo::Foo::Foo;
80
+ | ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`
81
+
82
+ error: variable `Foo` should have a snake case name
83
+ --> $DIR/lint-uppercase-variables.rs:33:17
84
+ |
85
+ LL | fn in_param(Foo: foo::Foo) {}
86
+ | ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`
87
+
88
+ error: aborting due to 6 previous errors
53
89
54
90
For more information about this error, try `rustc --explain E0170`.
0 commit comments