Skip to content

Commit e01cf9b

Browse files
committed
Apply derivable_impls to Clippy itself
1 parent eb00908 commit e01cf9b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

clippy_lints/src/matches/significant_drop_in_scrutinee.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,12 @@ impl<'a, 'tcx> SigDropChecker<'a, 'tcx> {
226226
}
227227
}
228228

229-
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)]
229+
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Default)]
230230
enum SigDropHolder {
231231
/// No values with significant drop present in this expression.
232232
///
233233
/// Expressions that we've emitted lints do not count.
234+
#[default]
234235
None,
235236
/// Some field in this expression references to values with significant drop.
236237
///
@@ -244,12 +245,6 @@ enum SigDropHolder {
244245
Moved,
245246
}
246247

247-
impl Default for SigDropHolder {
248-
fn default() -> Self {
249-
Self::None
250-
}
251-
}
252-
253248
struct SigDropHelper<'a, 'tcx> {
254249
cx: &'a LateContext<'tcx>,
255250
parent_expr: Option<&'tcx Expr<'tcx>>,

0 commit comments

Comments
 (0)