2018-08-08 07:28:26 -05:00
|
|
|
warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:22:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | Foo => {}
|
|
|
|
| ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
|
|
|
|
|
|
|
|
warning: unused variable: `Foo`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:22:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | Foo => {}
|
|
|
|
| ^^^ help: consider using `_Foo` instead
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:1:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | #![warn(unused)]
|
|
|
|
| ^^^^^^
|
|
|
|
= note: #[warn(unused_variables)] implied by #[warn(unused)]
|
|
|
|
|
|
|
|
error: structure field `X` should have a snake case name such as `x`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:10:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | X: usize //~ ERROR structure field `X` should have a snake case name such as `x`
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:3:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(non_snake_case)]
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: variable `Xx` should have a snake case name such as `xx`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:13:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn test(Xx: usize) { //~ ERROR variable `Xx` should have a snake case name such as `xx`
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: variable `Test` should have a snake case name such as `test`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:18:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let Test: usize = 0; //~ ERROR variable `Test` should have a snake case name such as `test`
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error: variable `Foo` should have a snake case name such as `foo`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:22:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | Foo => {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0170`.
|