Skip to content

Make let-else respect macro_rules expr metavariable grouping - #158515

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bb1yd:let-else-detect-invisible-delimiter
Sep 20, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bb1yd:let-else-detect-invisible-delimiter

Conversation

@bb1yd

@bb1yd bb1yd commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #147899

@rustbot

rustbot commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

The parser was modified, potentially altering the grammar of (stable) Rust
which would be a breaking change.

cc @fmease

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 28, 2026
@rustbot

rustbot commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 18 candidates

@bb1yd bb1yd changed the title make let-else respect macro_rules expr metavariable grouping Make let-else respect macro_rules expr metavariable grouping Jun 28, 2026
@bb1yd
bb1yd marked this pull request as draft June 28, 2026 08:00
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 28, 2026
@bb1yd
bb1yd force-pushed the let-else-detect-invisible-delimiter branch from 15b1465 to 5e53d92 Compare June 28, 2026 12:33
@bb1yd
bb1yd marked this pull request as ready for review June 28, 2026 13:25
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 28, 2026
@bb1yd

bb1yd commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@jackh726 Friendly ping, any feedback? :)

@jackh726

jackh726 commented Aug 7, 2026

Copy link
Copy Markdown
Member

Nominating for t-lang. This is a bug fix, but accepts new programs. Unsure if an FCP here is needed.

@jackh726 jackh726 added the I-lang-nominated Nominated for discussion during a lang team meeting. label Aug 7, 2026
@traviscross traviscross added P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang T-lang Relevant to the language team labels Aug 12, 2026
@traviscross

Copy link
Copy Markdown
Contributor

@rfcbot fcp merge lang

@rust-rfcbot

rust-rfcbot commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

@traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Aug 12, 2026
@joshtriplett

Copy link
Copy Markdown
Member

@rfcbot reviewed

@traviscross traviscross added the I-lang-radar Items that are on lang's radar and will need eventual work or consideration. label Aug 12, 2026
@rust-rfcbot rust-rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Aug 12, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@traviscross traviscross removed I-lang-nominated Nominated for discussion during a lang team meeting. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang labels Aug 12, 2026
@scottmcm

Copy link
Copy Markdown
Member

This seems like it was obviously supposed to work this way, but under the "it'd be breaking to revert this" probably best to FCP it since it's a one-way thing.

@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Aug 22, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

@jackh726

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5e53d92 has been approved by jackh726

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 19, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Sep 19, 2026
…limiter, r=jackh726

Make let-else respect macro_rules expr metavariable grouping

Fixes rust-lang#147899
rust-bors Bot pushed a commit that referenced this pull request Sep 19, 2026
Rollup of 13 pull requests

Successful merges:

 - #158515 (Make let-else respect macro_rules expr metavariable grouping)
 - #160097 (fix const_item_mutation lint to use needs_drop instead of has_dtor)
 - #161435 (Provide a `supertrait_def_ids()` function in rustc_type_ir's interner)
 - #161894 (Do not suppress the fn item uniqueness note for late bound lifetimes)
 - #162990 (post GH comment on types nominations)
 - #154665 (add safety section for mem::zeroed)
 - #162700 ( Remove incorrect parse error recovery code that mistakes `as` casts for the long removed type ascription)
 - #162705 (Trigger "C array" parse error recovery in far fewer cases)
 - #162875 (Add .seek_read_exact(), .seek_write_all() to std::os::windows::fs::FileExt)
 - #162988 (recover `true` and `false` in type position as `bool`)
 - #162995 (Constify `impl FromStr for NonZero<T>`)
 - #163006 (Use `end_point` for trailing brace in `let...else` diagnostics)
 - #163007 (add Dir::try_clone)
@rust-bors

rust-bors Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

⌛ Testing commit 5e53d92 with merge b54bafa...

Workflow: https://github.com/rust-lang/rust/actions/runs/35469534304

rust-bors Bot pushed a commit that referenced this pull request Sep 19, 2026
…jackh726

Make let-else respect macro_rules expr metavariable grouping


Fixes #147899
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 19, 2026
…limiter, r=jackh726

Make let-else respect macro_rules expr metavariable grouping

Fixes rust-lang#147899
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors yield
Yielding to enclosing rollup

@rust-bors

rust-bors Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Auto build was cancelled. Cancelled workflows:

The next pull request likely to be tested is #163038.

rust-bors Bot pushed a commit that referenced this pull request Sep 19, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #158515 (Make let-else respect macro_rules expr metavariable grouping)
 - #162726 (std: fix unix socket address panic on a full sun_path)
 - #160028 (Better account for `Self` that might be a typo of `self`)
 - #160097 (fix const_item_mutation lint to use needs_drop instead of has_dtor)
 - #161435 (Provide a `supertrait_def_ids()` function in rustc_type_ir's interner)
 - #161894 (Do not suppress the fn item uniqueness note for late bound lifetimes)
 - #162990 (post GH comment on types nominations)
 - #154665 (add safety section for mem::zeroed)
 - #162700 ( Remove incorrect parse error recovery code that mistakes `as` casts for the long removed type ascription)
 - #162705 (Trigger "C array" parse error recovery in far fewer cases)
 - #162875 (Add .seek_read_exact(), .seek_write_all() to std::os::windows::fs::FileExt)
 - #162988 (recover `true` and `false` in type position as `bool`)
 - #162995 (Constify `impl FromStr for NonZero<T>`)
 - #163006 (Use `end_point` for trailing brace in `let...else` diagnostics)
 - #163007 (add Dir::try_clone)
rust-bors Bot pushed a commit that referenced this pull request Sep 20, 2026
Rollup of 17 pull requests

Successful merges:

 - #158515 (Make let-else respect macro_rules expr metavariable grouping)
 - #160028 (Better account for `Self` that might be a typo of `self`)
 - #160097 (fix const_item_mutation lint to use needs_drop instead of has_dtor)
 - #161435 (Provide a `supertrait_def_ids()` function in rustc_type_ir's interner)
 - #161894 (Do not suppress the fn item uniqueness note for late bound lifetimes)
 - #162990 (post GH comment on types nominations)
 - #153662 (Suggest fully qualified path on method name collision)
 - #154665 (add safety section for mem::zeroed)
 - #159787 (Prefer ModId in more places)
 - #162700 ( Remove incorrect parse error recovery code that mistakes `as` casts for the long removed type ascription)
 - #162705 (Trigger "C array" parse error recovery in far fewer cases)
 - #162875 (Add .seek_read_exact(), .seek_write_all() to std::os::windows::fs::FileExt)
 - #162988 (recover `true` and `false` in type position as `bool`)
 - #162995 (Constify `impl FromStr for NonZero<T>`)
 - #163006 (Use `end_point` for trailing brace in `let...else` diagnostics)
 - #163007 (add Dir::try_clone)
 - #163039 (Use verbose suggestion for parenthetical `Fn` notation and fully-qualified path on ambiguous assoc item)
rust-bors Bot pushed a commit that referenced this pull request Sep 20, 2026
Rollup of 17 pull requests

Successful merges:

 - #158515 (Make let-else respect macro_rules expr metavariable grouping)
 - #160028 (Better account for `Self` that might be a typo of `self`)
 - #160097 (fix const_item_mutation lint to use needs_drop instead of has_dtor)
 - #161435 (Provide a `supertrait_def_ids()` function in rustc_type_ir's interner)
 - #161894 (Do not suppress the fn item uniqueness note for late bound lifetimes)
 - #162990 (post GH comment on types nominations)
 - #153662 (Suggest fully qualified path on method name collision)
 - #154665 (add safety section for mem::zeroed)
 - #159787 (Prefer ModId in more places)
 - #162700 ( Remove incorrect parse error recovery code that mistakes `as` casts for the long removed type ascription)
 - #162705 (Trigger "C array" parse error recovery in far fewer cases)
 - #162875 (Add .seek_read_exact(), .seek_write_all() to std::os::windows::fs::FileExt)
 - #162988 (recover `true` and `false` in type position as `bool`)
 - #162995 (Constify `impl FromStr for NonZero<T>`)
 - #163006 (Use `end_point` for trailing brace in `let...else` diagnostics)
 - #163007 (add Dir::try_clone)
 - #163039 (Use verbose suggestion for parenthetical `Fn` notation and fully-qualified path on ambiguous assoc item)
@rust-bors
rust-bors Bot merged commit dff5c55 into rust-lang:main Sep 20, 2026
13 of 14 checks passed
rust-bors Bot pushed a commit that referenced this pull request Sep 20, 2026
Rollup merge of #158515 - bb1yd:let-else-detect-invisible-delimiter, r=jackh726

Make let-else respect macro_rules expr metavariable grouping

Fixes #147899
@rustbot rustbot added this to the 1.100.0 milestone Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team to-announce Announce this issue on triage meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

let-else does not respect macro_rules expr metavariable grouping

8 participants