2022-11-08 10:24:06 -05:00
|
|
|
error[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:22:9
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | Foo => {}
|
2022-12-17 20:11:25 +01:00
|
|
|
| ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
|
2019-12-31 21:25:16 +01:00
|
|
|
|
|
2022-11-08 10:24:06 -05:00
|
|
|
= note: `#[deny(bindings_with_variant_name)]` on by default
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2022-11-08 10:24:06 -05:00
|
|
|
error[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo`
|
2020-01-20 17:57:08 +01:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:28:9
|
|
|
|
|
|
|
|
|
LL | let Foo = foo::Foo::Foo;
|
2022-12-17 20:11:25 +01:00
|
|
|
| ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
|
2020-01-20 17:57:08 +01:00
|
|
|
|
2018-08-08 14:28:26 +02:00
|
|
|
warning: unused variable: `Foo`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:22:9
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | Foo => {}
|
2020-03-23 11:02:46 +03:00
|
|
|
| ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:1:9
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | #![warn(unused)]
|
|
|
|
| ^^^^^^
|
2019-07-16 22:17:38 +02:00
|
|
|
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2020-01-20 17:57:08 +01:00
|
|
|
warning: unused variable: `Foo`
|
|
|
|
--> $DIR/lint-uppercase-variables.rs:28:9
|
|
|
|
|
|
|
|
|
LL | let Foo = foo::Foo::Foo;
|
2020-03-23 11:02:46 +03:00
|
|
|
| ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`
|
2020-01-20 17:57:08 +01:00
|
|
|
|
2023-02-16 10:06:59 +00:00
|
|
|
error[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo`
|
|
|
|
--> $DIR/lint-uppercase-variables.rs:33:17
|
|
|
|
|
|
|
|
|
LL | fn in_param(Foo: foo::Foo) {}
|
|
|
|
| ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
|
|
|
|
|
2020-01-20 17:57:08 +01:00
|
|
|
warning: unused variable: `Foo`
|
|
|
|
--> $DIR/lint-uppercase-variables.rs:33:17
|
|
|
|
|
|
|
|
|
LL | fn in_param(Foo: foo::Foo) {}
|
2020-03-23 11:02:46 +03:00
|
|
|
| ^^^ help: if this is intentional, prefix it with an underscore: `_Foo`
|
2020-01-20 17:57:08 +01:00
|
|
|
|
2019-01-04 10:19:52 -05:00
|
|
|
error: structure field `X` should have a snake case name
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:10:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | X: usize
|
2019-10-13 21:48:39 -07:00
|
|
|
| ^ help: convert the identifier to snake case (notice the capitalization): `x`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:3:9
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | #![deny(non_snake_case)]
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
2019-01-04 10:19:52 -05:00
|
|
|
error: variable `Xx` should have a snake case name
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:13:9
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | fn test(Xx: usize) {
|
2019-10-13 21:48:39 -07:00
|
|
|
| ^^ help: convert the identifier to snake case (notice the capitalization): `xx`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2019-01-04 10:19:52 -05:00
|
|
|
error: variable `Test` should have a snake case name
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:18:9
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | let Test: usize = 0;
|
2019-10-14 14:30:59 -07:00
|
|
|
| ^^^^ help: convert the identifier to snake case: `test`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2019-01-04 10:19:52 -05:00
|
|
|
error: variable `Foo` should have a snake case name
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/lint-uppercase-variables.rs:22:9
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | Foo => {}
|
2019-10-13 21:48:39 -07:00
|
|
|
| ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2020-01-20 17:57:08 +01:00
|
|
|
error: variable `Foo` should have a snake case name
|
|
|
|
--> $DIR/lint-uppercase-variables.rs:28:9
|
|
|
|
|
|
|
|
|
LL | let Foo = foo::Foo::Foo;
|
|
|
|
| ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`
|
|
|
|
|
|
|
|
error: variable `Foo` should have a snake case name
|
|
|
|
--> $DIR/lint-uppercase-variables.rs:33:17
|
|
|
|
|
|
|
|
|
LL | fn in_param(Foo: foo::Foo) {}
|
|
|
|
| ^^^ help: convert the identifier to snake case (notice the capitalization): `foo`
|
|
|
|
|
2022-11-08 10:24:06 -05:00
|
|
|
error: aborting due to 9 previous errors; 3 warnings emitted
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0170`.
|