Skip to content

port rustc_ast* crates from box_ to deref_patterns#156193

Merged
rust-bors[bot] merged 4 commits intorust-lang:mainfrom
cyrgani:unbox-1
May 6, 2026
Merged

port rustc_ast* crates from box_ to deref_patterns#156193
rust-bors[bot] merged 4 commits intorust-lang:mainfrom
cyrgani:unbox-1

Conversation

@cyrgani
Copy link
Copy Markdown
Contributor

@cyrgani cyrgani commented May 5, 2026

Part of #156110, this ports the first few crates away from box_patterns to deref_patterns.

@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 May 5, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 5, 2026

r? @mejrs

rustbot has assigned @mejrs.
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

@mejrs
Copy link
Copy Markdown
Contributor

mejrs commented May 5, 2026

This is great to see :)

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 5, 2026

📌 Commit 46fac37 has been approved by mejrs

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 May 5, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request May 5, 2026
port `rustc_ast*` crates from `box_` to `deref_patterns`

Part of rust-lang#156110, this ports the first few crates away from `box_patterns` to `deref_patterns`.
jhpratt added a commit to jhpratt/rust that referenced this pull request May 5, 2026
port `rustc_ast*` crates from `box_` to `deref_patterns`

Part of rust-lang#156110, this ports the first few crates away from `box_patterns` to `deref_patterns`.
rust-bors Bot pushed a commit that referenced this pull request May 5, 2026
Rollup of 12 pull requests

Successful merges:

 - #155341 (generic_const_args: allow paths to non type consts)
 - #156062 (Added command-line argument support for `wasm32-wali-linux-musl`)
 - #156159 ([AIX] add -bdbg:namedsects:ss link arg)
 - #156174 (Wasm: remove implicit `__heap_base`/`__data_end` exports)
 - #156186 (fix: remap ci-llvm debug paths via `-ffile-prefix-map`)
 - #156193 (port `rustc_ast*` crates from `box_` to `deref_patterns`)
 - #156201 (Don't run ui-fulldeps tests twice in stage 1)
 - #155808 (Always use `ConstFn` context for `const` closures)
 - #156105 (interpret: correctly deal with repr(transparent) enums)
 - #156148 (Use `all_impls` instead of handrolling it)
 - #156156 (Adjust getMCSubtargetInfo signature for LLVM 23+)
 - #156205 (move generalization test)
@ChayimFriedman2
Copy link
Copy Markdown
Contributor

FWIW r-a does not support deref patterns yet, but I made a PR to support it right now: rust-lang/rust-analyzer#22292.

rust-bors Bot pushed a commit that referenced this pull request May 6, 2026
Rollup of 15 pull requests

Successful merges:

 - #151122 (fix: more descriptive error message for enum to integer)
 - #155341 (generic_const_args: allow paths to non type consts)
 - #156062 (Added command-line argument support for `wasm32-wali-linux-musl`)
 - #156159 ([AIX] add -bdbg:namedsects:ss link arg)
 - #156174 (Wasm: remove implicit `__heap_base`/`__data_end` exports)
 - #156186 (fix: remap ci-llvm debug paths via `-ffile-prefix-map`)
 - #156193 (port `rustc_ast*` crates from `box_` to `deref_patterns`)
 - #156201 (Don't run ui-fulldeps tests twice in stage 1)
 - #155808 (Always use `ConstFn` context for `const` closures)
 - #156105 (interpret: correctly deal with repr(transparent) enums)
 - #156148 (Use `all_impls` instead of handrolling it)
 - #156156 (Adjust getMCSubtargetInfo signature for LLVM 23+)
 - #156170 (add known-bug test for coroutine 'static-yields-non-'static unsoundness (#144442))
 - #156195 (Move tests codegen)
 - #156205 (move generalization test)
rust-bors Bot pushed a commit that referenced this pull request May 6, 2026
Rollup of 15 pull requests

Successful merges:

 - #151122 (fix: more descriptive error message for enum to integer)
 - #155341 (generic_const_args: allow paths to non type consts)
 - #156062 (Added command-line argument support for `wasm32-wali-linux-musl`)
 - #156159 ([AIX] add -bdbg:namedsects:ss link arg)
 - #156174 (Wasm: remove implicit `__heap_base`/`__data_end` exports)
 - #156186 (fix: remap ci-llvm debug paths via `-ffile-prefix-map`)
 - #156193 (port `rustc_ast*` crates from `box_` to `deref_patterns`)
 - #156201 (Don't run ui-fulldeps tests twice in stage 1)
 - #155808 (Always use `ConstFn` context for `const` closures)
 - #156105 (interpret: correctly deal with repr(transparent) enums)
 - #156148 (Use `all_impls` instead of handrolling it)
 - #156156 (Adjust getMCSubtargetInfo signature for LLVM 23+)
 - #156170 (add known-bug test for coroutine 'static-yields-non-'static unsoundness (#144442))
 - #156195 (Move tests codegen)
 - #156205 (move generalization test)
@mejrs
Copy link
Copy Markdown
Contributor

mejrs commented May 6, 2026

FWIW r-a does not support deref patterns yet, but I made a PR to support it right now: rust-lang/rust-analyzer#22292.

In the zulip stream we thought that it would already work: #t-compiler/major changes > replace `box_patterns` in the compiler wi… compiler-team#984 @ 💬

@fmease would you prefer to wait until then?

@fmease
Copy link
Copy Markdown
Member

fmease commented May 6, 2026

Interesting that cyrgani wasn't flooded by r-a errors back when they tested it while I did face them in personal projects, maybe that's caused by a different configuration, they closed the file before r-a caught up with analysis or r-a died with {unknown} instead?

I don't want to block this PR, it's already in the queue and it only touches a few modules. I definitely hope that Chayim's PR makes it into a rustup nightly release before implicit deref patterns are everywhere but I think I can endure red paint in the compiler as long as it doesn't dry :D Thanks for the ping!

rust-bors Bot pushed a commit that referenced this pull request May 6, 2026
Rollup of 15 pull requests

Successful merges:

 - #151122 (fix: more descriptive error message for enum to integer)
 - #155341 (generic_const_args: allow paths to non type consts)
 - #156062 (Added command-line argument support for `wasm32-wali-linux-musl`)
 - #156159 ([AIX] add -bdbg:namedsects:ss link arg)
 - #156174 (Wasm: remove implicit `__heap_base`/`__data_end` exports)
 - #156186 (fix: remap ci-llvm debug paths via `-ffile-prefix-map`)
 - #156193 (port `rustc_ast*` crates from `box_` to `deref_patterns`)
 - #156201 (Don't run ui-fulldeps tests twice in stage 1)
 - #155808 (Always use `ConstFn` context for `const` closures)
 - #156105 (interpret: correctly deal with repr(transparent) enums)
 - #156148 (Use `all_impls` instead of handrolling it)
 - #156156 (Adjust getMCSubtargetInfo signature for LLVM 23+)
 - #156170 (add known-bug test for coroutine 'static-yields-non-'static unsoundness (#144442))
 - #156195 (Move tests codegen)
 - #156205 (move generalization test)
@rust-bors rust-bors Bot merged commit d1cdc9b into rust-lang:main May 6, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 6, 2026
rust-timer added a commit that referenced this pull request May 6, 2026
Rollup merge of #156193 - cyrgani:unbox-1, r=mejrs

port `rustc_ast*` crates from `box_` to `deref_patterns`

Part of #156110, this ports the first few crates away from `box_patterns` to `deref_patterns`.
@ChayimFriedman2
Copy link
Copy Markdown
Contributor

Oh, this does not use the deref!() macro, I'm not entirely sure what is the difference but this might already be supported, yeah.

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

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants