Skip to content

Conversation

@ftxqxd
Copy link
Contributor

@ftxqxd ftxqxd commented Nov 30, 2014

The only other place I know of that doesn’t allow trailing commas is closure types (#19414), and those are a bit tricky to fix (I suspect it might be impossible without infinite lookahead) so I didn’t implement that in this patch. There are other issues surrounding closure type parsing anyway, in particular #19410.

@alexcrichton
Copy link
Member

It seems ok to parse trailing commas, but trailing commas in some array patterns seems unusual in that they allow a trailing comma after the ... Struct patterns, for example, do not allow trailing commas. Would it be possible to not allow a trailing comma after the ..?

@ftxqxd ftxqxd force-pushed the more-trailing-commas branch from 272b3c0 to f5715f7 Compare November 30, 2014 09:29
@ftxqxd
Copy link
Contributor Author

ftxqxd commented Nov 30, 2014

@alexcrichton OK, I’ve made trailing commas directly after ..s in patterns a syntax error. r?

@alexcrichton alexcrichton merged commit f5715f7 into rust-lang:master Dec 5, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Apr 28, 2025
fix: Properly calculate the layouts of tuple ptrs whose last fields are DST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants