Open ehuss opened 5 years ago
I believe this is a bug on rustc's end since we never signed off on this parser change. (it may very well be that it should not matter syntactically, just semantically...). On the other hand, we (the language team) could also decide that this is fine and leave it be. I'll bring it up on a T-Lang meeting to see what we want to do.
In 1.34, via https://github.com/rust-lang/rust/pull/58191, the restriction that lifetimes appear before types in generic arguments was removed from libsyntax. However, type bindings are still required to be after types and lifetimes.
Should this order constraint be part of the syntax? The current lyg grammar (and libsyntax) encodes this restriction. But after discussing this on Discord, I was wondering why relax one constraint but not the other?
Example:
See
parse_generic_args
which I think implies this should not be restricted.