mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 20:17:50 +00:00
![]() 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? |
||
---|---|---|
.. | ||
bindings.rs | ||
branch.rs | ||
cant_move_out_of_pattern.rs | ||
cant_move_out_of_pattern.stderr | ||
closure_capture.rs | ||
dont-ice-on-slice-in-deref-pat-in-closure.rs | ||
fake_borrows.rs | ||
fake_borrows.stderr | ||
ref-mut.rs | ||
ref-mut.stderr | ||
typeck_fail.rs | ||
typeck_fail.stderr | ||
typeck.rs |