Open
Description
Hi. (I read the contribution guidelines and I think I'm flagging this for you as a mistake in the spec, rather than as an upstream change. I hope this is helpful.)
rustc rejects <-
: it is lexed as a single token, which isn't legal anywhere. For <
followed by -
one must write < -
:
error: unexpected token: `<-`
--> src/main.rs:2:22
|
2 | println!("{}", 4 <- 3);
| ^^
|
help: if you meant to write a comparison against a negative value, add a space in between `<` and `-`
However the spec section 2 doesn't seem to discuss this. I think this should probably be fixed by adding <-
to the table of compund punctuators (2.2.8) and the table of punctuator names (2.2.13).
The impact seems very low; it just means that rustc rejects some programs that the spec regards as correct.
Metadata
Metadata
Assignees
Labels
No labels