diff options
| author | Rust timing bot <rust-timer@users.noreply.github.com> | 2025-10-04 11:31:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-04 11:31:00 +0200 |
| commit | 823632bbfbb2941cdc3c69130f19b39ea565a7aa (patch) | |
| tree | 708d400c34370dfee537670607588999292d0bc3 /tests/ui/parser/match-arm-without-body.rs | |
| parent | 7950f244e7ef55b61a83d12f4662be643cd182d6 (diff) | |
| parent | d1d7b9472a18780499162b4a91beea729bc2c13b (diff) | |
| download | rust-perf-tmp.tar.gz rust-perf-tmp.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/parser/match-arm-without-body.rs')
| -rw-r--r-- | tests/ui/parser/match-arm-without-body.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/parser/match-arm-without-body.rs b/tests/ui/parser/match-arm-without-body.rs index 4723abff8b6..7fe5b6d2539 100644 --- a/tests/ui/parser/match-arm-without-body.rs +++ b/tests/ui/parser/match-arm-without-body.rs @@ -17,13 +17,13 @@ fn main() { Some(_), //~^ ERROR unexpected `,` in pattern //~| HELP try adding parentheses to match on a tuple - //~| HELP or a vertical bar to match on multiple alternatives + //~| HELP or a vertical bar to match on alternative } match Some(false) { Some(_), //~^ ERROR unexpected `,` in pattern //~| HELP try adding parentheses to match on a tuple - //~| HELP or a vertical bar to match on multiple alternatives + //~| HELP or a vertical bar to match on alternative _ => {} } match Some(false) { |
