Skip to content

internal: match_ast macro supports guard#22755

Merged
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
A4-Tacks:match-ast-guard
Jul 10, 2026
Merged

internal: match_ast macro supports guard#22755
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
A4-Tacks:match-ast-guard

Conversation

@A4-Tacks

Copy link
Copy Markdown
Member

Example

match_ast! {
    match parent {
        ast::Expr(it) if !it.is_block_like() => replace(it),
        _ => return,
    }
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 10, 2026
@rustbot

This comment has been minimized.

Example
---
```rust
match_ast! {
    match parent {
        ast::Expr(it) if !it.is_block_like() => replace(it),
        _ => return,
    }
}
```
@rustbot

rustbot commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@ChayimFriedman2 ChayimFriedman2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is so simple that I'm not opposed even though it's not used currently.

View changes since this review

@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Jul 10, 2026
Merged via the queue into rust-lang:master with commit 9edb92e Jul 10, 2026
18 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 10, 2026
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.

3 participants