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.
Consider this code:
The
Okstruct compiles just right, but theErrone fails withI think this behavior is wrong: for tokens like
>>or||use use "context sensitive" lexing.