diff options
| author | bors <bors@rust-lang.org> | 2019-10-28 13:41:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-28 13:41:13 +0000 |
| commit | 8d78bf6b273848d17da8f5c92162c6a6b9b10dfd (patch) | |
| tree | 5d19d9a52e7311543dccd0a9e43fe16d63aef336 /src/test/ui/pattern | |
| parent | 03a50ae9b87021d4a166c70d2c932f1cb0aa8f28 (diff) | |
| parent | b26ddb8af37362e33c45c78c9c91a3c5cdabfe7e (diff) | |
| download | rust-8d78bf6b273848d17da8f5c92162c6a6b9b10dfd.tar.gz rust-8d78bf6b273848d17da8f5c92162c6a6b9b10dfd.zip | |
Auto merge of #65421 - estebank:variants, r=petrochenkov
Point at local similarly named element and tweak references to variants Partially address #65386.
Diffstat (limited to 'src/test/ui/pattern')
| -rw-r--r-- | src/test/ui/pattern/pattern-error-continue.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/pattern/pattern-error-continue.stderr | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/test/ui/pattern/pattern-error-continue.rs b/src/test/ui/pattern/pattern-error-continue.rs index 7e79868f874..79cc4b552a7 100644 --- a/src/test/ui/pattern/pattern-error-continue.rs +++ b/src/test/ui/pattern/pattern-error-continue.rs @@ -15,7 +15,7 @@ fn f(_c: char) {} fn main() { match A::B(1, 2) { A::B(_, _, _) => (), //~ ERROR this pattern has 3 fields, but - A::D(_) => (), //~ ERROR expected tuple struct/variant, found unit variant `A::D` + A::D(_) => (), //~ ERROR expected tuple struct or tuple variant, found unit variant `A::D` _ => () } match 'c' { diff --git a/src/test/ui/pattern/pattern-error-continue.stderr b/src/test/ui/pattern/pattern-error-continue.stderr index 4fbc630644b..5a7dab30d83 100644 --- a/src/test/ui/pattern/pattern-error-continue.stderr +++ b/src/test/ui/pattern/pattern-error-continue.stderr @@ -4,9 +4,12 @@ error[E0433]: failed to resolve: use of undeclared type or module `E` LL | E::V => {} | ^ use of undeclared type or module `E` -error[E0532]: expected tuple struct/variant, found unit variant `A::D` +error[E0532]: expected tuple struct or tuple variant, found unit variant `A::D` --> $DIR/pattern-error-continue.rs:18:9 | +LL | B(isize, isize), + | --------------- similarly named tuple variant `B` defined here +... LL | A::D(_) => (), | ^^^- | | |
