From 6059d59548f94a43b346b0b95c7a74e2dd9b1aa0 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 23 May 2025 10:18:05 +0000 Subject: Properly analyze captures from unsafe binders --- clippy_utils/src/sugg.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clippy_utils') diff --git a/clippy_utils/src/sugg.rs b/clippy_utils/src/sugg.rs index 93dec113d31..f4dfc8f4b5a 100644 --- a/clippy_utils/src/sugg.rs +++ b/clippy_utils/src/sugg.rs @@ -941,6 +941,8 @@ impl<'tcx> Delegate<'tcx> for DerefDelegate<'_, 'tcx> { ProjectionKind::Subslice | // Doesn't have surface syntax. Only occurs in patterns. ProjectionKind::OpaqueCast => (), + // Only occurs in closure captures. + ProjectionKind::UnwrapUnsafeBinder => (), ProjectionKind::Deref => { // Explicit derefs are typically handled later on, but // some items do not need explicit deref, such as array accesses, -- cgit 1.4.1-3-g733a5