about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-10-21 07:01:36 +0200
committerGitHub <noreply@github.com>2024-10-21 07:01:36 +0200
commit9ff4dab39689829994cee9be4c83fd1c16d209f3 (patch)
treeca916bbc968c2163ad487fd7bb1ff9cf09703e21 /tests/rustdoc-js-std/parser-errors.js
parentfb32dd41ed278e2d691900248d94aa9bc4409f99 (diff)
parentf1070825bb40587d482b8916a031b48a6c6a763e (diff)
downloadrust-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