diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-10-21 07:01:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-21 07:01:36 +0200 |
| commit | 9ff4dab39689829994cee9be4c83fd1c16d209f3 (patch) | |
| tree | ca916bbc968c2163ad487fd7bb1ff9cf09703e21 /tests/rustdoc-js-std/parser-errors.js | |
| parent | fb32dd41ed278e2d691900248d94aa9bc4409f99 (diff) | |
| parent | f1070825bb40587d482b8916a031b48a6c6a763e (diff) | |
| download | rust-9ff4dab39689829994cee9be4c83fd1c16d209f3.tar.gz rust-9ff4dab39689829994cee9be4c83fd1c16d209f3.zip | |
Rollup merge of #126588 - linyihai:trim-extra-comma, r=petrochenkov
Added more scenarios where comma to be removed in the function arg
This is an attempt to address the problem methion in https://github.com/rust-lang/rust/issues/106304#issuecomment-1837273666.
Copy the annotation to explain the fix
If the next Error::Extra ("next") doesn't next to current ("current")
```
fn foo(_: (), _: u32) {}
- foo("current", (), 1u32, "next")
+ foo((), 1u32)
```
If the previous error is not a `Error::Extra`, then do not trim the next comma
```
- foo((), "current", 42u32, "next")
+ foo((), 42u32)
```
Frankly, this is a fix from a test case and may not cover all scenarios
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions
