summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/lint-uppercase-variables.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/lint/lint-uppercase-variables.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/lint/lint-uppercase-variables.stderr')
-rw-r--r--tests/ui/lint/lint-uppercase-variables.stderr90
1 files changed, 90 insertions, 0 deletions
diff --git a/tests/ui/lint/lint-uppercase-variables.stderr b/tests/ui/lint/lint-uppercase-variables.stderr
new file mode 100644
index 000000000..42ec9364b
--- /dev/null
+++ b/tests/ui/lint/lint-uppercase-variables.stderr
@@ -0,0 +1,90 @@
+error[E0170]: pattern binding `Foo` is named the same as one of the variants of the type `foo::Foo`
+ --> $DIR/lint-uppercase-variables.rs:22:9
+ |
+LL | Foo => {}
+ | ^^^ help: to match on the variant, qualify the path: `foo::Foo::Foo`
+ |
+ = note: `#[deny(bindings_with_variant_name)]` on by default
+
+error[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`
+
+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`
+
+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 9 previous errors; 3 warnings emitted
+
+For more information about this error, try `rustc --explain E0170`.