-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.
Description
Consider this code:
struct Ok <T: Clone + = ()> { t: T }
struct Err<T: Clone += ()> { t: T }
The Ok
struct compiles just right, but the Err
one fails with
error: expected one of `(`, `+`, `,`, `::`, `<`, `=`, or `>`, found `+=`
--> main.rs:2:21
|
2 | struct Err<T: Clone += ()> { t: T }
| ^^ expected one of 7 possible tokens here
error: aborting due to previous error
I think this behavior is wrong: for tokens like >>
or ||
use use "context sensitive" lexing.
hanna-kruppe, qnighy, killercup, scottmcm and kennytm
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.