Skip to content

Conversation

@Zalathar
Copy link
Member

@Zalathar Zalathar commented Dec 19, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Zalathar and others added 7 commits December 18, 2025 17:48
This avoids having to awkwardly ignore the `Pinnedness` field.
It turns out that lifetime `'a` is just `'tcx` in disguise.
mir_build: Don't use a mixture of THIR pattern kinds for pin-patterns

While looking for improvements to match-lowering, I had been trying to figure out why pin-patterns sometimes use `PatKind::Deref` and sometimes use `PatKind::DerefPattern`, which seemed confusing to me. In particular, both pattern kinds are being used with an inner type of `&` or `&mut`, which is very surprising.

The conclusion I came to was that `DerefPattern` (normally associated with calls to Deref/DerefMut) was only being used for *implicit* pin-patterns produced by match-ergonomics adjustment, whereas `Deref` was being used for explicit pin-patterns.

The inconsistency seems like a mistake to me, so this PR removes all uses of `DerefPattern` for pin-patterns, and consistently uses `PatKind::Deref` for pin-patterns instead. I'm not entirely happy with that outcome, because I think pin-patterns should probably have their own `thir::PatKind` variant, but this change will at least make that easier to achieve in a later PR.

r? Nadrieril
mir_build: Remove unnecessary lifetime from THIR `PatCtxt`

It turns out that lifetime `'a` is just `'tcx` in disguise.
…athanBrouwer

move eii tests

Just a little housekeeping. This feature is getting a lot of tests, so it felt good to put some tests for type checking in its own folder to organise a little. Should be trivial!
@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. rollup A PR which is a rollup labels Dec 19, 2025
@Zalathar
Copy link
Member Author

Rollup of everything.

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Dec 19, 2025

📌 Commit 77491e7 has been approved by Zalathar

It is now in the queue for this repository.

@bors bors 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 Dec 19, 2025
@bors
Copy link
Collaborator

bors commented Dec 19, 2025

⌛ Testing commit 77491e7 with merge b889870...

bors added a commit that referenced this pull request Dec 19, 2025
Rollup of 3 pull requests

Successful merges:

 - #150121 (mir_build: Don't use a mixture of THIR pattern kinds for pin-patterns)
 - #150148 (mir_build: Remove unnecessary lifetime from THIR `PatCtxt`)
 - #150150 (move eii tests)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup 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.

4 participants