rust/src/test/ui/lint/lint-uppercase-variables.stderr

91 lines
3.1 KiB
Plaintext
Raw Normal View History

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`
|
= note: `#[warn(bindings_with_variant_name)]` on by default
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`
--> $DIR/lint-uppercase-variables.rs:28:9
|
LL | let Foo = foo::Foo::Foo;
| ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
warning[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`
2018-08-08 07:28:26 -05:00
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 prefixing with an underscore: `_Foo`
2018-08-08 07:28:26 -05:00
|
2020-01-22 17:57:38 -06:00
note: the lint level is 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)]`
2018-08-08 07:28:26 -05:00
warning: unused variable: `Foo`
--> $DIR/lint-uppercase-variables.rs:28:9
|
LL | let Foo = foo::Foo::Foo;
| ^^^ help: consider prefixing with an underscore: `_Foo`
warning: unused variable: `Foo`
--> $DIR/lint-uppercase-variables.rs:33:17
|
LL | fn in_param(Foo: foo::Foo) {}
| ^^^ help: consider prefixing with an underscore: `_Foo`
error: structure field `X` should have a snake case name
2018-12-25 09:56:47 -06:00
--> $DIR/lint-uppercase-variables.rs:10:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | X: usize
| ^ help: convert the identifier to snake case (notice the capitalization): `x`
2018-08-08 07:28:26 -05:00
|
2020-01-22 17:57:38 -06:00
note: the lint level is 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
2018-12-25 09:56:47 -06:00
--> $DIR/lint-uppercase-variables.rs:13:9
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | fn test(Xx: usize) {
| ^^ help: convert the identifier to snake case (notice the capitalization): `xx`
2018-08-08 07:28:26 -05:00
error: variable `Test` should have a snake case name
2018-12-25 09:56:47 -06:00
--> $DIR/lint-uppercase-variables.rs:18:9
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | let Test: usize = 0;
| ^^^^ help: convert the identifier to snake case: `test`
2018-08-08 07:28:26 -05:00
error: variable `Foo` should have a snake case name
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: convert the identifier to snake case (notice the capitalization): `foo`
2018-08-08 07:28:26 -05: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`
error: aborting due to 6 previous errors
2018-08-08 07:28:26 -05:00
For more information about this error, try `rustc --explain E0170`.