Visitar URL original
Fix left arrow being split into less-than and negative-sign by dtolnay · Pull Request #2086 · dtolnay/syn · GitHub
Skip to content

Fix left arrow being split into less-than and negative-sign - #2086

Merged
dtolnay merged 1 commit into
masterfrom
leftarrow
Oct 11, 2026
Merged

dtolnay merged 1 commit into
masterfrom
leftarrow

Conversation

@dtolnay

@dtolnay dtolnay commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Previously syn would parse -3 <-1 the same as -3 < -1, while rustc rejects it.

error: unexpected token: `<-`
 --> src/main.rs:1:20
  |
1 | const _: bool = -3 <-1;
  |                    ^^
  |
help: if you meant to write a comparison against a negative value, add a space in between `<` and `-`
  |
1 | const _: bool = -3 < -1;
  |                     +

@dtolnay
dtolnay merged commit 5631c74 into master Oct 11, 2026
30 checks passed
@dtolnay
dtolnay deleted the leftarrow branch October 11, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant