summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr')
-rw-r--r--tests/ui/pattern/issue-67776-match-same-name-enum-variant-refs.stderr41
1 files changed, 41 insertions, 0 deletions
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`.