Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Detect missing errors for } braces before else in let...else statements #18908

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jnyfah
Copy link

@jnyfah jnyfah commented Jan 10, 2025

fixes #18345 - rust-analyzer fails to emit errors for let...else statements when the initializer expression ends in a block-like construct

  • Updated CompletedMarker to store the position where the node was completed.
  • Introduced a new last_token function that walks back through the parsing events from the completion position to find the last emitted token.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 10, 2025
@jnyfah jnyfah marked this pull request as ready for review January 10, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing errors for } braces before else in let...else statement
2 participants