about summary refs log tree commit diff
path: root/tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-10-03 21:10:31 +0200
committerGitHub <noreply@github.com>2025-10-03 21:10:31 +0200
commit2e06dcdbeb45f1df32d97d7a85b923d8996b9592 (patch)
tree74e51057a8ac72ad7c88dace1d2b0b5a7ccb3d8d /tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
parentf437c86ef829e43c6aa27641f53040a999a092af (diff)
parentd1d7b9472a18780499162b4a91beea729bc2c13b (diff)
downloadrust-2e06dcdbeb45f1df32d97d7a85b923d8996b9592.tar.gz
rust-2e06dcdbeb45f1df32d97d7a85b923d8996b9592.zip
Rollup merge of #147245 - karolzwolak:only-replace-intended-bar-not-all-in-pattern, r=lcnr
only replace the intended comma in pattern suggestions

Only suggest to replace the intended comma, not all bars in the pattern.
Fixes rust-lang/rust#143330.
This continues rust-lang/rust#143331, the credit for making the fix goes to `@A4-Tacks.` I just blessed tests and added a regression test.
Diffstat (limited to 'tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr')
-rw-r--r--tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr b/tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
index c74cb89f85c..286d6021396 100644
--- a/tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
+++ b/tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
@@ -32,10 +32,10 @@ help: try adding parentheses to match on a tuple...
    |
 LL |         (Nucleotide::Adenine, Nucleotide::Cytosine, _) => true
    |         +                                            +
-help: ...or a vertical bar to match on multiple alternatives
+help: ...or a vertical bar to match on alternatives
    |
 LL -         Nucleotide::Adenine, Nucleotide::Cytosine, _ => true
-LL +         Nucleotide::Adenine | Nucleotide::Cytosine | _ => true
+LL +         Nucleotide::Adenine | Nucleotide::Cytosine, _ => true
    |
 
 error: unexpected `,` in pattern