diff options
| author | yanglsh <yanglsh@shanghaitech.edu.cn> | 2025-08-23 06:13:35 +0800 |
|---|---|---|
| committer | yanglsh <yanglsh@shanghaitech.edu.cn> | 2025-08-23 06:13:35 +0800 |
| commit | e01cf9bd4845cb1b1e3b89e93d6731540bc489b7 (patch) | |
| tree | 78e147315029fc87928c40bc1626f6ec489f4c1f | |
| parent | eb009082321f15f2a6faed1198d4e31d2d163ff9 (diff) | |
| download | rust-e01cf9bd4845cb1b1e3b89e93d6731540bc489b7.tar.gz rust-e01cf9bd4845cb1b1e3b89e93d6731540bc489b7.zip | |
Apply `derivable_impls` to Clippy itself
| -rw-r--r-- | clippy_lints/src/matches/significant_drop_in_scrutinee.rs | 9 |
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>>, |
