Skip to content

Commit 4881632

Browse files
authored
Merge pull request dtolnay#1172 from dtolnay/pedanticclippy
Suppress various pedantic clippy lints
2 parents 19f1bb6 + 69f0380 commit 4881632

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

macro/src/derive.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ fn struct_clone(strct: &Struct, span: Span) -> TokenStream {
123123
};
124124

125125
quote_spanned! {span=>
126+
#[allow(clippy::expl_impl_clone_on_copy)]
126127
impl #generics ::cxx::core::clone::Clone for #ident #generics {
127128
fn clone(&self) -> Self {
128129
#body
@@ -230,6 +231,7 @@ fn enum_clone(enm: &Enum, span: Span) -> TokenStream {
230231
let ident = &enm.name.rust;
231232

232233
quote_spanned! {span=>
234+
#[allow(clippy::expl_impl_clone_on_copy)]
233235
impl ::cxx::core::clone::Clone for #ident {
234236
fn clone(&self) -> Self {
235237
*self

macro/src/expand.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,13 @@ fn expand(ffi: Module, doc: Doc, attrs: OtherAttrs, apis: &[Api], types: &Types)
139139
#attrs
140140
#[deny(improper_ctypes, improper_ctypes_definitions)]
141141
#[allow(clippy::unknown_clippy_lints)]
142-
#[allow(non_camel_case_types, non_snake_case, clippy::upper_case_acronyms)]
142+
#[allow(
143+
non_camel_case_types,
144+
non_snake_case,
145+
clippy::ptr_as_ptr,
146+
clippy::upper_case_acronyms,
147+
clippy::use_self,
148+
)]
143149
#vis #mod_token #ident #expanded
144150
}
145151
}

0 commit comments

Comments
 (0)