This repository was archived by the owner on Apr 8, 2024. It is now read-only.
This repository was archived by the owner on Apr 8, 2024. It is now read-only.
Should generic argument order be part of the syntax? #40
Open
Description
In 1.34, via rust-lang/rust#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:
fn test<W, I: Trait<Item=(), W> >() {}
See parse_generic_args
which I think implies this should not be restricted.