Skip to content

remove box_patterns - #156749

Merged
rust-bors[bot] merged 4 commits into
rust-lang:mainfrom
cyrgani:unbox-full
Aug 25, 2026
Merged

remove box_patterns#156749
rust-bors[bot] merged 4 commits into
rust-lang:mainfrom
cyrgani:unbox-full

Conversation

@cyrgani

@cyrgani cyrgani commented May 19, 2026

Copy link
Copy Markdown
Contributor

View all comments

This PR removes the old feature box_patterns, tracked in #29641. As explained in #29641 (comment), this feature will not be stabilized since deref_patterns (#87121) is a better and more general version of this feature.

It was not possible to remove this feature until recently since the compiler itself still depended on this feature. This was changed with rust-lang/compiler-team#984.

This PR currently breaks crates that rely on box patterns using the incorrect pre-expansion feature gating (see #154045 for more details). Therefore, this needs a crater run.

Closes #29641.
Closes #105099.
Closes #156110.

@cyrgani cyrgani added S-blocked Status: Blocked on something else such as an RFC or other implementation work. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. I-lang-nominated Nominated for discussion during a lang team meeting. needs-crater This change needs a crater run to check for possible breakage in the ecosystem. labels May 19, 2026
@rustbot

rustbot commented May 19, 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

The Rustfmt subtree was changed

cc @rust-lang/rustfmt

The Clippy subtree was changed

cc @rust-lang/clippy

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

rustbot commented May 19, 2026

Copy link
Copy Markdown
Collaborator

r? @Kivooeo

rustbot has assigned @Kivooeo.
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 20 candidates

@cyrgani cyrgani changed the title remove box_patterrns remove box_patterns May 19, 2026
@rust-log-analyzer

This comment has been minimized.

@Kivooeo

Kivooeo commented May 19, 2026

Copy link
Copy Markdown
Member

Therefore, this needs a crater run

Which one? would check-only be sufficient for this?

Comment thread tests/ui/match/issue-42679.rs
@traviscross traviscross added the P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang label May 27, 2026
@tmandry tmandry added the T-lang Relevant to the language team label May 27, 2026
@tmandry

tmandry commented May 27, 2026

Copy link
Copy Markdown
Member

I don't expect the crater breakage to be significant; if it is, we should discuss again.

@rfcbot merge lang

@rust-rfcbot

rust-rfcbot commented May 27, 2026

Copy link
Copy Markdown
Collaborator

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

Concerns:

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 May 27, 2026
@traviscross traviscross added the I-lang-radar Items that are on lang's radar and will need eventual work or consideration. label May 27, 2026
@traviscross

Copy link
Copy Markdown
Contributor

Looks good to me pending crater results; thanks @cyrgani.

@rfcbot reviewed
@rfcbot concern crater

@Kivooeo

Kivooeo commented May 29, 2026

Copy link
Copy Markdown
Member

About to run crater. In my opinion check-only should be sufficient for this, do folks have other opinion?

@fmease

fmease commented May 29, 2026

Copy link
Copy Markdown
Member

About to run crater. In my opinion check-only should be sufficient for this, do folks have other opinion?

Yes, it's absolutely sufficient. This PR rejects previously valid code in the frontend of the compiler, it removes syntax. The only things that don't show up in check builds are monomorphization and codegen changes.

IINM one thing which you miss out on in check-only crater runs are potential doctest regressions but that's just something you have to accept if you want to have "faster" crater runs, otherwise craterbot check would never be an option for anyone. In any case, the beta crater runs will run in build-and-test mode and exercise doctests anyway, so we'd still catch such regressions eventually and still have a bit of time to either revert the change or to send (more) downstream patches. Anyway, it's not super likely that anybody is using box patterns in doctests (without also using them in the main crater), I'd say.

@fmease

fmease commented May 29, 2026

Copy link
Copy Markdown
Member

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 29, 2026
@rust-bors

rust-bors Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 1639375 (163937523761cc0def32f1ba9ed63fdf65ad3478, parent: dc375db7d8df0aa450e622c529147c95eee756f5)

@Kivooeo

Kivooeo commented May 29, 2026

Copy link
Copy Markdown
Member

@craterbot run mode=check-only

@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 24, 2026
remove `box_patterns`

This PR removes the old feature `box_patterns`, tracked in rust-lang#29641. As explained in rust-lang#29641 (comment), this feature will not be stabilized since `deref_patterns` (rust-lang#87121) is a better and more general version of this feature.

It was not possible to remove this feature until recently since the compiler itself still depended on this feature. This was changed with rust-lang/compiler-team#984.

This PR currently breaks crates that rely on box patterns using the incorrect pre-expansion feature gating (see rust-lang#154045 for more details). Therefore, this needs a crater run.

Closes rust-lang#29641.
Closes rust-lang#105099.
Closes rust-lang#156110.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 24, 2026
remove `box_patterns`

This PR removes the old feature `box_patterns`, tracked in rust-lang#29641. As explained in rust-lang#29641 (comment), this feature will not be stabilized since `deref_patterns` (rust-lang#87121) is a better and more general version of this feature.

It was not possible to remove this feature until recently since the compiler itself still depended on this feature. This was changed with rust-lang/compiler-team#984.

This PR currently breaks crates that rely on box patterns using the incorrect pre-expansion feature gating (see rust-lang#154045 for more details). Therefore, this needs a crater run.

Closes rust-lang#29641.
Closes rust-lang#105099.
Closes rust-lang#156110.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 24, 2026
remove `box_patterns`

This PR removes the old feature `box_patterns`, tracked in rust-lang#29641. As explained in rust-lang#29641 (comment), this feature will not be stabilized since `deref_patterns` (rust-lang#87121) is a better and more general version of this feature.

It was not possible to remove this feature until recently since the compiler itself still depended on this feature. This was changed with rust-lang/compiler-team#984.

This PR currently breaks crates that rely on box patterns using the incorrect pre-expansion feature gating (see rust-lang#154045 for more details). Therefore, this needs a crater run.

Closes rust-lang#29641.
Closes rust-lang#105099.
Closes rust-lang#156110.
rust-bors Bot pushed a commit that referenced this pull request Aug 24, 2026
Rollup of 9 pull requests

Successful merges:

 - #161689 (bootstrap: don't LTO C dependencies on aarch64)
 - #161553 (rustdoc: fix issue preventing "read more" links from generating.)
 - #161670 (Pass LargeDataThreshold to LLVM module IR)
 - #146529 (rustdoc: Nuke `--passes=list` and defossilize the passes infrastructure)
 - #156009 (Check `redundant_explicit_links` against generated URLs)
 - #159583 (Add new `invalid_markdown_table` rustdoc lint)
 - #161098 (PassWrapper: handle LLVM 24 change in function types)
 - #161641 (Check for missing rustfmt in the stdarch intrinsic test step sooner)
 - #161661 (Don't treat slashes as path seps after drive letters in verbatim paths)

Failed merges:

 - #156749 (remove `box_patterns`)
@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 24, 2026
@rust-bors

This comment has been minimized.

@cyrgani cyrgani 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 Aug 25, 2026
@fmease

fmease commented Aug 25, 2026

Copy link
Copy Markdown
Member

@bors r=Kivooeo,fmease

@rust-bors

rust-bors Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9609b96 has been approved by Kivooeo,fmease

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 Aug 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
Rollup of 5 pull requests

Successful merges:

 - #156749 (remove `box_patterns`)
 - #161411 (avoid overlapping const suggestions)
 - #161484 (Discard `.pdr` in the PSP linker script)
 - #161663 (Reduce dependency on implicit paths in bootstrap)
 - #161720 (rename rust_target_features query to make it clear that these are *all* target features)
@rust-bors
rust-bors Bot merged commit a7ace5d into rust-lang:main Aug 25, 2026
13 checks passed
rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
Rollup merge of #156749 - cyrgani:unbox-full, r=Kivooeo,fmease

remove `box_patterns`

This PR removes the old feature `box_patterns`, tracked in #29641. As explained in #29641 (comment), this feature will not be stabilized since `deref_patterns` (#87121) is a better and more general version of this feature.

It was not possible to remove this feature until recently since the compiler itself still depended on this feature. This was changed with rust-lang/compiler-team#984.

This PR currently breaks crates that rely on box patterns using the incorrect pre-expansion feature gating (see #154045 for more details). Therefore, this needs a crater run.

Closes #29641.
Closes #105099.
Closes #156110.
@rustbot rustbot added this to the 1.100.0 milestone Aug 25, 2026
@cyrgani
cyrgani deleted the unbox-full branch August 25, 2026 11:59
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-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. to-announce Announce this issue on triage meeting

Projects

None yet