From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- ...-67776-match-same-name-enum-variant-refs.stderr | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr (limited to 'tests/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr') diff --git a/tests/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr b/tests/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr new file mode 100644 index 000000000..da580c7ac --- /dev/null +++ b/tests/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr @@ -0,0 +1,41 @@ +error[E0170]: pattern binding `Bar` is named the same as one of the variants of the type `Foo` + --> $DIR/issue-67776-match-same-name-enum-variant-refs.rs:15:9 + | +LL | Bar => {}, + | ^^^ help: to match on the variant, qualify the path: `Foo::Bar` + | + = note: `#[deny(bindings_with_variant_name)]` on by default + +error[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` + --> $DIR/issue-67776-match-same-name-enum-variant-refs.rs:17:9 + | +LL | Baz => {}, + | ^^^ help: to match on the variant, qualify the path: `Foo::Baz` + +error[E0170]: pattern binding `Bar` is named the same as one of the variants of the type `Foo` + --> $DIR/issue-67776-match-same-name-enum-variant-refs.rs:24:9 + | +LL | Bar => {}, + | ^^^ help: to match on the variant, qualify the path: `Foo::Bar` + +error[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` + --> $DIR/issue-67776-match-same-name-enum-variant-refs.rs:26:9 + | +LL | Baz => {}, + | ^^^ help: to match on the variant, qualify the path: `Foo::Baz` + +error[E0170]: pattern binding `Bar` is named the same as one of the variants of the type `Foo` + --> $DIR/issue-67776-match-same-name-enum-variant-refs.rs:33:9 + | +LL | Bar => {}, + | ^^^ help: to match on the variant, qualify the path: `Foo::Bar` + +error[E0170]: pattern binding `Baz` is named the same as one of the variants of the type `Foo` + --> $DIR/issue-67776-match-same-name-enum-variant-refs.rs:35:9 + | +LL | Baz => {}, + | ^^^ help: to match on the variant, qualify the path: `Foo::Baz` + +error: aborting due to 6 previous errors + +For more information about this error, try `rustc --explain E0170`. -- cgit v1.2.3