diff options
| author | dianne <diannes.gm@gmail.com> | 2025-03-12 23:08:37 -0700 |
|---|---|---|
| committer | dianne <diannes.gm@gmail.com> | 2025-03-13 01:01:26 -0700 |
| commit | 36ff87e90e7f39cffb508292a63792cc0dcfbd6e (patch) | |
| tree | adb4aa51f09152af238fa2e3aa832ca6114eb23b /compiler/rustc_interface/src | |
| parent | 0e76f8b7e02b1ddd349dde1501f73426a4e764cf (diff) | |
| download | rust-36ff87e90e7f39cffb508292a63792cc0dcfbd6e.tar.gz rust-36ff87e90e7f39cffb508292a63792cc0dcfbd6e.zip | |
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?
Diffstat (limited to 'compiler/rustc_interface/src')
0 files changed, 0 insertions, 0 deletions
