diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-03-14 01:37:35 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-14 01:37:35 -0400 |
| commit | f5055722b65682815d5f18dd7e08a0e9ee7218aa (patch) | |
| tree | 3e283cf7ff6d1357021724936f11857ac7dadd86 /compiler/rustc_interface/src | |
| parent | 7de35c8bb85170e885c34e2fdb45f95d4125e8f2 (diff) | |
| parent | 36ff87e90e7f39cffb508292a63792cc0dcfbd6e (diff) | |
| download | rust-f5055722b65682815d5f18dd7e08a0e9ee7218aa.tar.gz rust-f5055722b65682815d5f18dd7e08a0e9ee7218aa.zip | |
Rollup merge of #138442 - dianne:deref-pat-euv-fix, r=compiler-errors
EUV: fix place of deref pattern's interior's scrutinee The place previously used here was that of the temporary holding the reference returned by `Deref::deref` or `DerefMut::deref_mut`. However, since the inner pattern of `deref!(inner)` expects the deref-target type itself, this would ICE when that type was inspected (e.g. by the EUV case for slice patterns). This adds a deref projection to fix that. Since current in-tree consumers of EUV (upvar inference and clippy) don't care about Rvalues, the place could be simplified to `self.cat_rvalue(pat.hir_id, self.pat_ty_adjusted(subpat)?)` to save some cycles. I personally find EUV to be a bit fragile, so I've opted for pedantic correctness. Maybe a `HACK` comment would suffice though? Fixes #125059 r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions
