Visitar URL original
Allow end of expr before `->` by dtolnay · Pull Request #2087 · dtolnay/syn · GitHub
Skip to content

Allow end of expr before -> - #2087

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

dtolnay merged 1 commit into
masterfrom
rightarrow

Conversation

@dtolnay

@dtolnay dtolnay commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Similar to #2086. Previously syn split the -> into - > and failed like this:

error: expected an expression
 --> src/main.rs:1:24
  |
1 | const _: bool = false -> true;
  |                        ^

The new behavior is to not split:

error: expected `;`
 --> src/main.rs:1:23
  |
1 | const _: bool = false -> true;
  |                       ^

@dtolnay
dtolnay merged commit e1eab98 into master Oct 11, 2026
30 checks passed
@dtolnay
dtolnay deleted the rightarrow branch October 11, 2026 16:12
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