@@ -6,6 +6,18 @@ LL | Foo => {}
66 |
77 = note: `#[warn(bindings_with_variant_name)]` on by default
88
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+
921warning: unused variable: `Foo`
1022 --> $DIR/lint-uppercase-variables.rs:22:9
1123 |
@@ -19,6 +31,18 @@ LL | #![warn(unused)]
1931 | ^^^^^^
2032 = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
2133
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+
2246error: structure field `X` should have a snake case name
2347 --> $DIR/lint-uppercase-variables.rs:10:5
2448 |
@@ -49,6 +73,18 @@ error: variable `Foo` should have a snake case name
4973LL | Foo => {}
5074 | ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`
5175
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
5389
5490For more information about this error, try `rustc --explain E0170`.
0 commit comments