File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ impl<'tcx> LateLintPass<'tcx> for DerivableImpls {
83
83
if !attrs. iter( ) . any( |attr| attr. doc_str( ) . is_some( ) ) ;
84
84
if let child_attrs = cx. tcx. hir( ) . attrs( impl_item_hir) ;
85
85
if !child_attrs. iter( ) . any( |attr| attr. doc_str( ) . is_some( ) ) ;
86
+ if adt_def. is_struct( ) ;
86
87
then {
87
88
if let TyKind :: Path ( QPath :: Resolved ( _, p) ) = self_ty. kind {
88
89
if let Some ( PathSegment { args: Some ( a) , .. } ) = p. segments. last( ) {
Original file line number Diff line number Diff line change @@ -227,4 +227,17 @@ impl Default for RepeatDefault2 {
227
227
}
228
228
}
229
229
230
+ // https://github.com/rust-lang/rust-clippy/issues/7753
231
+
232
+ pub enum IntOrString {
233
+ Int ( i32 ) ,
234
+ String ( String ) ,
235
+ }
236
+
237
+ impl Default for IntOrString {
238
+ fn default ( ) -> Self {
239
+ IntOrString :: Int ( 0 )
240
+ }
241
+ }
242
+
230
243
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments