about summary refs log tree commit diff
diff options
context:
space:
mode:
authoryanglsh <yanglsh@shanghaitech.edu.cn>2025-08-23 06:13:35 +0800
committeryanglsh <yanglsh@shanghaitech.edu.cn>2025-08-23 06:13:35 +0800
commite01cf9bd4845cb1b1e3b89e93d6731540bc489b7 (patch)
tree78e147315029fc87928c40bc1626f6ec489f4c1f
parenteb009082321f15f2a6faed1198d4e31d2d163ff9 (diff)
downloadrust-e01cf9bd4845cb1b1e3b89e93d6731540bc489b7.tar.gz
rust-e01cf9bd4845cb1b1e3b89e93d6731540bc489b7.zip
Apply `derivable_impls` to Clippy itself
-rw-r--r--clippy_lints/src/matches/significant_drop_in_scrutinee.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/clippy_lints/src/matches/significant_drop_in_scrutinee.rs b/clippy_lints/src/matches/significant_drop_in_scrutinee.rs
index 027dd7ce053..81fecc87256 100644
--- a/clippy_lints/src/matches/significant_drop_in_scrutinee.rs
+++ b/clippy_lints/src/matches/significant_drop_in_scrutinee.rs
@@ -226,11 +226,12 @@ impl<'a, 'tcx> SigDropChecker<'a, 'tcx> {
     }
 }
 
-#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)]
+#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Default)]
 enum SigDropHolder {
     /// No values with significant drop present in this expression.
     ///
     /// Expressions that we've emitted lints do not count.
+    #[default]
     None,
     /// Some field in this expression references to values with significant drop.
     ///
@@ -244,12 +245,6 @@ enum SigDropHolder {
     Moved,
 }
 
-impl Default for SigDropHolder {
-    fn default() -> Self {
-        Self::None
-    }
-}
-
 struct SigDropHelper<'a, 'tcx> {
     cx: &'a LateContext<'tcx>,
     parent_expr: Option<&'tcx Expr<'tcx>>,