about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-13 14:32:33 +0000
committerbors <bors@rust-lang.org>2022-07-13 14:32:33 +0000
commit4e3a7bf7a88c3128ee3065d9c793136234382e11 (patch)
tree4b6de741ed813c7877f5e84ee2da0f9cfc1501ea
parent9e2f6895a8dc5176a971a162e9c5bf38223c88ed (diff)
parent9d86ce6533f43ea2322738b2211bd4d4bbf22633 (diff)
Auto merge of #98145 - ouz-a:some_branch, r=oli-obk
Pull Derefer before ElaborateDrops

_Follow up work to #97025 #96549 #96116 #95887 #95649_

This moves `Derefer` before `ElaborateDrops` and creates a new `Rvalue` called `VirtualRef` that allows us to bypass many constraints for `DerefTemp`.

r? `@oli-obk`
-rw-r--r--clippy_utils/src/qualify_min_const_fn.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/clippy_utils/src/qualify_min_const_fn.rs b/clippy_utils/src/qualify_min_const_fn.rs
index 498dcbb8900..f3283588c73 100644
--- a/clippy_utils/src/qualify_min_const_fn.rs
+++ b/clippy_utils/src/qualify_min_const_fn.rs
@@ -124,6 +124,7 @@ fn check_rvalue<'tcx>(
         Rvalue::Len(place) | Rvalue::Discriminant(place) | Rvalue::Ref(_, _, place) | Rvalue::AddressOf(_, place) => {
             check_place(tcx, *place, span, body)
         },
+        Rvalue::CopyForDeref(place) => check_place(tcx, *place, span, body),
         Rvalue::Repeat(operand, _)
         | Rvalue::Use(operand)
         | Rvalue::Cast(