about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-12-02 20:33:55 +0000
committerbors <bors@rust-lang.org>2020-12-02 20:33:55 +0000
commitf4db9ffb22dfcb702dbdb2e0607cb91791866b57 (patch)
treea8590aca5d239ac7201327e12c0cb687952e77bf /src
parentaf69066aa6afa7bff771a6ee9548b2b84a02a88a (diff)
parentde3a0bdf0503b22a8e4507c7b2d4cb84c335d272 (diff)
Auto merge of #79364 - nico-abram:unstable-or-pat-suggestion, r=matthewjasper
Fixes #79357 unstable or-pat suggestions

Fixes #79357
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr33
1 files changed, 3 insertions, 30 deletions
diff --git a/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr b/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
index d05d6d120b0..26c24d7432c 100644
--- a/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
+++ b/src/test/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
@@ -47,46 +47,19 @@ error: unexpected `,` in pattern
   --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:67:10
    |
 LL |     for x, _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
-   |          ^
-   |
-help: try adding parentheses to match on a tuple...
-   |
-LL |     for (x, _barr_body) in women.iter().map(|woman| woman.allosomes.clone()) {
-   |         ^^^^^^^^^^^^^^^
-help: ...or a vertical bar to match on multiple alternatives
-   |
-LL |     for x | _barr_body in women.iter().map(|woman| woman.allosomes.clone()) {
-   |         ^^^^^^^^^^^^^^
+   |         -^----------- help: try adding parentheses to match on a tuple: `(x, _barr_body)`
 
 error: unexpected `,` in pattern
   --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:75:10
    |
 LL |     for x, y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
-   |          ^
-   |
-help: try adding parentheses to match on a tuple...
-   |
-LL |     for (x, y @ Allosome::Y(_)) in men.iter().map(|man| man.allosomes.clone()) {
-   |         ^^^^^^^^^^^^^^^^^^^^^^^
-help: ...or a vertical bar to match on multiple alternatives
-   |
-LL |     for x | y @ Allosome::Y(_) in men.iter().map(|man| man.allosomes.clone()) {
-   |         ^^^^^^^^^^^^^^^^^^^^^^
+   |         -^------------------- help: try adding parentheses to match on a tuple: `(x, y @ Allosome::Y(_))`
 
 error: unexpected `,` in pattern
   --> $DIR/issue-48492-tuple-destructure-missing-parens.rs:84:14
    |
 LL |     let women, men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
-   |              ^
-   |
-help: try adding parentheses to match on a tuple...
-   |
-LL |     let (women, men): (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
-   |         ^^^^^^^^^^^^
-help: ...or a vertical bar to match on multiple alternatives
-   |
-LL |     let women | men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
-   |         ^^^^^^^^^^^
+   |         -----^---- help: try adding parentheses to match on a tuple: `(women, men)`
 
 error: aborting due to 6 previous errors