Skip to content

Commit 6059d59

Browse files
Properly analyze captures from unsafe binders
1 parent 7e5c819 commit 6059d59

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clippy_utils/src/sugg.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,8 @@ impl<'tcx> Delegate<'tcx> for DerefDelegate<'_, 'tcx> {
941941
ProjectionKind::Subslice |
942942
// Doesn't have surface syntax. Only occurs in patterns.
943943
ProjectionKind::OpaqueCast => (),
944+
// Only occurs in closure captures.
945+
ProjectionKind::UnwrapUnsafeBinder => (),
944946
ProjectionKind::Deref => {
945947
// Explicit derefs are typically handled later on, but
946948
// some items do not need explicit deref, such as array accesses,

0 commit comments

Comments
 (0)