fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.7 KiB52 linesraw
1warning[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   |
4LL |         Foo => {}
5   |         ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
6
7warning: unused variable: `Foo`
8  --> $DIR/lint-uppercase-variables.rs:22:9
9   |
10LL |         Foo => {}
11   |         ^^^ help: consider prefixing with an underscore: `_Foo`
12   |
13note: lint level defined here
14  --> $DIR/lint-uppercase-variables.rs:1:9
15   |
16LL | #![warn(unused)]
17   |         ^^^^^^
18   = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
19
20error: structure field `X` should have a snake case name
21  --> $DIR/lint-uppercase-variables.rs:10:5
22   |
23LL |     X: usize
24   |     ^ help: convert the identifier to snake case (notice the capitalization): `x`
25   |
26note: lint level defined here
27  --> $DIR/lint-uppercase-variables.rs:3:9
28   |
29LL | #![deny(non_snake_case)]
30   |         ^^^^^^^^^^^^^^
31
32error: variable `Xx` should have a snake case name
33  --> $DIR/lint-uppercase-variables.rs:13:9
34   |
35LL | fn test(Xx: usize) {
36   |         ^^ help: convert the identifier to snake case (notice the capitalization): `xx`
37
38error: variable `Test` should have a snake case name
39  --> $DIR/lint-uppercase-variables.rs:18:9
40   |
41LL |     let Test: usize = 0;
42   |         ^^^^ help: convert the identifier to snake case: `test`
43
44error: variable `Foo` should have a snake case name
45  --> $DIR/lint-uppercase-variables.rs:22:9
46   |
47LL |         Foo => {}
48   |         ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`
49
50error: aborting due to 4 previous errors
51
52For more information about this error, try `rustc --explain E0170`.