diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-08-06 17:26:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-06 17:26:29 +0200 |
| commit | 13de58358301f1affe0d8fbdeb1f8e8bf8d5fe00 (patch) | |
| tree | d4220fe0d4a72ec45cbd6afe6ea9f5b9783c8d33 /src/tools/clippy/clippy_lints | |
| parent | 92c04217bab4726319839d2fdae05c255c94e3a8 (diff) | |
| parent | 6df546281bf8ffc39df9430aa1717656dfbbcf7a (diff) | |
| download | rust-13de58358301f1affe0d8fbdeb1f8e8bf8d5fe00.tar.gz rust-13de58358301f1affe0d8fbdeb1f8e8bf8d5fe00.zip | |
Rollup merge of #114505 - ouz-a:cleanup_mir, r=RalfJung
Add documentation to has_deref Documentation of `has_deref` needed some polish to be more clear about where it should be used and what's it's purpose. cc https://github.com/rust-lang/rust/issues/114401 r? `@RalfJung`
Diffstat (limited to 'src/tools/clippy/clippy_lints')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/dereference.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/clippy/clippy_lints/src/dereference.rs b/src/tools/clippy/clippy_lints/src/dereference.rs index 137bd9c9451..bc011a6c354 100644 --- a/src/tools/clippy/clippy_lints/src/dereference.rs +++ b/src/tools/clippy/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() { |
