File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 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 {
8383 if !attrs. iter( ) . any( |attr| attr. doc_str( ) . is_some( ) ) ;
8484 if let child_attrs = cx. tcx. hir( ) . attrs( impl_item_hir) ;
8585 if !child_attrs. iter( ) . any( |attr| attr. doc_str( ) . is_some( ) ) ;
86+ if adt_def. is_struct( ) ;
8687 then {
8788 if let TyKind :: Path ( QPath :: Resolved ( _, p) ) = self_ty. kind {
8889 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 {
227227 }
228228}
229229
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+
230243fn main ( ) { }
You can’t perform that action at this time.
0 commit comments