about summary refs log tree commit diff
diff options
context:
space:
mode:
authorouz-a <ouz.agz@gmail.com>2023-08-05 12:02:39 +0300
committerouz-a <ouz.agz@gmail.com>2023-08-06 17:29:09 +0300
commit44cd3bcbbad87b9ffd1cf4c2cc97d8bc1795f660 (patch)
tree0a43dc495cb41a729bfcddfefb7b135fc3ccbe10
parentb0e64a9c09773e5ac908d89bff3db95d35491308 (diff)
downloadrust-44cd3bcbbad87b9ffd1cf4c2cc97d8bc1795f660.tar.gz
rust-44cd3bcbbad87b9ffd1cf4c2cc97d8bc1795f660.zip
cleanup misinformation regarding has_deref
-rw-r--r--clippy_lints/src/dereference.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/dereference.rs b/clippy_lints/src/dereference.rs
index a5ec979ccd9..aeaf9fae891 100644
--- a/clippy_lints/src/dereference.rs
+++ b/clippy_lints/src/dereference.rs
@@ -1170,7 +1170,7 @@ fn referent_used_exactly_once<'tcx>(
         && let [location] = *local_assignments(mir, local).as_slice()
         && let Some(statement) = mir.basic_blocks[location.block].statements.get(location.statement_index)
         && let StatementKind::Assign(box (_, Rvalue::Ref(_, _, place))) = statement.kind
-        && !place.has_deref()
+        && !place.is_indirect_first_projection()
         // Ensure not in a loop (https://github.com/rust-lang/rust-clippy/issues/9710)
         && TriColorDepthFirstSearch::new(&mir.basic_blocks).run_from(location.block, &mut CycleDetector).is_none()
     {