diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index c28cedf0cfe8..20649cd084ad 100644 --- a/clippy_lints/src/matches.rs +++ b/clippy_lints/src/matches.rs @@ -1737,11 +1737,11 @@ mod redundant_pattern_match { fn type_needs_ordered_drop(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { if !ty.needs_drop(cx.tcx, cx.param_env) { false - } else if cx + } else if !cx .tcx .lang_items() .drop_trait() - .map_or(false, |id| !implements_trait(cx, ty, id, &[])) + .map_or(false, |id| implements_trait(cx, ty, id, &[])) { // This type doesn't implement drop, so no side effects here. // Check if any component type has any.