-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
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)
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.