These productions currently allow trailing commas:
- Include with names list:
include-names-list
- Use lists:
use-names-list
- Record fields:
record-fields
- Flag fields:
flags-fields
- Variant cases:
variant-cases
- Enum cases:
enum-cases
- Tuple type list:
tuple-list
And these disallow trailing commas:
- Include with names list:
include-names-list
- Function parameters:
named-type-list
- Constant-length generic parameter types:
option, result, future, stream, borrow
All of the cases that we currently disallow trailing commas can accept trailing commas without adding ambiguity. I agree with @tschneidereit's judgment and think we should allow trailing commas in all currently disallowed cases.
Split off from #585