Skip to content
This repository was archived by the owner on Nov 9, 2025. It is now read-only.

Conversation

@jonas-schievink
Copy link
Contributor

@bors
Copy link
Contributor

bors bot commented Aug 12, 2021

Build succeeded:

@bors bors bot merged commit 074b255 into rust-analyzer:master Aug 12, 2021
@jonas-schievink jonas-schievink deleted the if-let-guard branch August 12, 2021 22:09
Comment on lines 490 to +491
MatchGuard =
'if' Expr
'if' ('let' Pat '=')? Expr
Copy link
Member

@Veykril Veykril Aug 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should define MatchGuard in terms of Condition now since its basically the same, that is:

MatchGuard =
  'if' Condition

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that could work. One thing I noticed is that the parser for condition couldn't be reused since it forbids struct literals.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants