From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/lint/lint-uppercase-variables.stderr | 90 ++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 src/test/ui/lint/lint-uppercase-variables.stderr (limited to 'src/test/ui/lint/lint-uppercase-variables.stderr') diff --git a/src/test/ui/lint/lint-uppercase-variables.stderr b/src/test/ui/lint/lint-uppercase-variables.stderr new file mode 100644 index 000000000..71b24a835 --- /dev/null +++ b/src/test/ui/lint/lint-uppercase-variables.stderr @@ -0,0 +1,90 @@ +warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `Foo` + --> $DIR/lint-uppercase-variables.rs:22:9 + | +LL | Foo => {} + | ^^^ help: to match on the variant, qualify the path: `Foo::Foo` + | + = note: `#[warn(bindings_with_variant_name)]` on by default + +warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `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` + +warning[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `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` + +warning: unused variable: `Foo` + --> $DIR/lint-uppercase-variables.rs:22:9 + | +LL | Foo => {} + | ^^^ help: if this is intentional, prefix it with an underscore: `_Foo` + | +note: the lint level is defined here + --> $DIR/lint-uppercase-variables.rs:1:9 + | +LL | #![warn(unused)] + | ^^^^^^ + = note: `#[warn(unused_variables)]` implied by `#[warn(unused)]` + +warning: unused variable: `Foo` + --> $DIR/lint-uppercase-variables.rs:28:9 + | +LL | let Foo = foo::Foo::Foo; + | ^^^ help: if this is intentional, prefix it with an underscore: `_Foo` + +warning: unused variable: `Foo` + --> $DIR/lint-uppercase-variables.rs:33:17 + | +LL | fn in_param(Foo: foo::Foo) {} + | ^^^ help: if this is intentional, prefix it with an underscore: `_Foo` + +error: structure field `X` should have a snake case name + --> $DIR/lint-uppercase-variables.rs:10:5 + | +LL | X: usize + | ^ help: convert the identifier to snake case (notice the capitalization): `x` + | +note: the lint level is defined here + --> $DIR/lint-uppercase-variables.rs:3:9 + | +LL | #![deny(non_snake_case)] + | ^^^^^^^^^^^^^^ + +error: variable `Xx` should have a snake case name + --> $DIR/lint-uppercase-variables.rs:13:9 + | +LL | fn test(Xx: usize) { + | ^^ help: convert the identifier to snake case (notice the capitalization): `xx` + +error: variable `Test` should have a snake case name + --> $DIR/lint-uppercase-variables.rs:18:9 + | +LL | let Test: usize = 0; + | ^^^^ help: convert the identifier to snake case: `test` + +error: variable `Foo` should have a snake case name + --> $DIR/lint-uppercase-variables.rs:22:9 + | +LL | 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: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; 6 warnings emitted + +For more information about this error, try `rustc --explain E0170`. -- cgit v1.2.3