Skip to content

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Sep 29, 2025

This attempts to clarify the parsing ambiguity between IdentifierPattern and PathPattern.

See PatKind::Ident and lower_pat_ident.

Closes #605

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Sep 29, 2025
@traviscross traviscross force-pushed the path-pattern-precedence branch 3 times, most recently from cacb1d9 to 6bc6aaa Compare October 7, 2025 22:50
@traviscross traviscross added this pull request to the merge queue Oct 7, 2025
@traviscross traviscross removed this pull request from the merge queue due to a manual request Oct 7, 2025
ehuss and others added 2 commits October 7, 2025 22:53
Let's extend the example to demonstrate, comparatively, what is parsed
as an `IdentifierPattern`.  Even though this is the common case,
showing this might be helpful to people less familiar with the
grammar.  Let's remove `main`, as that's not needed here.  And, in the
code, let's highlight specifically what we're commenting on by
commenting below the construct.
@traviscross traviscross force-pushed the path-pattern-precedence branch from 6bc6aaa to 2a45d5d Compare October 7, 2025 22:54
@rustbot
Copy link
Collaborator

rustbot commented Oct 7, 2025

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.

@traviscross traviscross enabled auto-merge October 7, 2025 22:54
@traviscross traviscross added this pull request to the merge queue Oct 7, 2025
Merged via the queue into rust-lang:master with commit fe513a2 Oct 7, 2025
5 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 7, 2025
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.

PathPattern vs IdentifierPattern
3 participants