Skip to content

Commit

Permalink
Suppress various pedantic clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Feb 1, 2023
1 parent 19f1bb6 commit 69f0380
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions macro/src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ fn struct_clone(strct: &Struct, span: Span) -> TokenStream {
};

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

quote_spanned! {span=>
#[allow(clippy::expl_impl_clone_on_copy)]
impl ::cxx::core::clone::Clone for #ident {
fn clone(&self) -> Self {
*self
Expand Down
8 changes: 7 additions & 1 deletion macro/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ fn expand(ffi: Module, doc: Doc, attrs: OtherAttrs, apis: &[Api], types: &Types)
#attrs
#[deny(improper_ctypes, improper_ctypes_definitions)]
#[allow(clippy::unknown_clippy_lints)]
#[allow(non_camel_case_types, non_snake_case, clippy::upper_case_acronyms)]
#[allow(
non_camel_case_types,
non_snake_case,
clippy::ptr_as_ptr,
clippy::upper_case_acronyms,
clippy::use_self,
)]
#vis #mod_token #ident #expanded
}
}
Expand Down

0 comments on commit 69f0380

Please sign in to comment.