Current parser allows ty/lt bounds have extra +. However, the comments on the parser suggest they shouldn't be allowed. grammar.md also suggests they shouldn't.
Expected behavior
Both the first and second lines should lead to parse error.
fn f<'a>() where 'a: 'a + {}
fn g<'a, X>() where X: 'a + {}
fn main() {
}
Current behavior
The current stable and nightly compilers allow the above code.
Meta
Tested on Rust Playground.
stable
rustc 1.16.0 (30cf806ef 2017-03-10)
nightly
rustc 1.18.0-nightly (50c186419 2017-04-06)
Current parser allows ty/lt bounds have extra
+. However, the comments on the parser suggest they shouldn't be allowed. grammar.md also suggests they shouldn't.Expected behavior
Both the first and second lines should lead to parse error.
Current behavior
The current stable and nightly compilers allow the above code.
Meta
Tested on Rust Playground.
stable
nightly