forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#126588 - linyihai:trim-extra-comma, r=petro…
…chenkov Added more scenarios where comma to be removed in the function arg This is an attempt to address the problem methion in rust-lang#106304 (comment). 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
- Loading branch information
Showing
5 changed files
with
76 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters