-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Description
Theory
Every place in the grammar which supports trailing commas should be tested that it fails for double commas, lest Rust be locked into supporting it forever. A particularly notable case of this is for macro_rules!
macros, many of which must manually implement their own trailing comma support (leading to more chances for mistakes).
Reality
[ lampam @ 12:22:45 ] (master •2) ~/asd/clone/rust/src/test
$ ls **/*.rs -1 > files
$ python3
>>> import re
>>> contents = [open(x.strip()).read() for x in open('files')]
>>> r = re.compile(',\\s*,\\s*[\\])}]', re.MULTILINE)
>>> [x for x in map(r.findall, contents) if x]
[]
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.