You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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< -
:https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c2ad15c3b9cd3bc8a98f31478b3e78f4
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.
The text was updated successfully, but these errors were encountered: