Files
rust/compiler
Stuart Cook 0e64ced2f7 Rollup merge of #150121 - Zalathar:pin-pat, r=Nadrieril
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
2025-12-20 00:32:31 +11:00
..
fix
2025-11-27 17:55:34 +07:00
2025-12-16 08:42:04 -08:00
2025-12-12 11:17:33 +01:00
2025-10-12 08:08:30 +00:00
2025-12-09 13:40:18 +00:00
2025-09-26 17:53:49 +02:00
2025-12-16 00:31:32 +09:00