]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/lint-uppercase-variables.stderr
generalize bindings_with_variant_name lint
[rust.git] / src / test / ui / lint / lint-uppercase-variables.stderr
1 warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo`
2   --> $DIR/lint-uppercase-variables.rs:22:9
3    |
4 LL |         Foo => {}
5    |         ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
6    |
7    = note: `#[warn(bindings_with_variant_name)]` on by default
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
21 warning: unused variable: `Foo`
22   --> $DIR/lint-uppercase-variables.rs:22:9
23    |
24 LL |         Foo => {}
25    |         ^^^ help: consider prefixing with an underscore: `_Foo`
26    |
27 note: lint level defined here
28   --> $DIR/lint-uppercase-variables.rs:1:9
29    |
30 LL | #![warn(unused)]
31    |         ^^^^^^
32    = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
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
46 error: structure field `X` should have a snake case name
47   --> $DIR/lint-uppercase-variables.rs:10:5
48    |
49 LL |     X: usize
50    |     ^ help: convert the identifier to snake case (notice the capitalization): `x`
51    |
52 note: lint level defined here
53   --> $DIR/lint-uppercase-variables.rs:3:9
54    |
55 LL | #![deny(non_snake_case)]
56    |         ^^^^^^^^^^^^^^
57
58 error: variable `Xx` should have a snake case name
59   --> $DIR/lint-uppercase-variables.rs:13:9
60    |
61 LL | fn test(Xx: usize) {
62    |         ^^ help: convert the identifier to snake case (notice the capitalization): `xx`
63
64 error: variable `Test` should have a snake case name
65   --> $DIR/lint-uppercase-variables.rs:18:9
66    |
67 LL |     let Test: usize = 0;
68    |         ^^^^ help: convert the identifier to snake case: `test`
69
70 error: variable `Foo` should have a snake case name
71   --> $DIR/lint-uppercase-variables.rs:22:9
72    |
73 LL |         Foo => {}
74    |         ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`
75
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
89
90 For more information about this error, try `rustc --explain E0170`.