Suppress various pedantic clippy lints

This commit is contained in:
David Tolnay 2023-02-01 12:44:48 -08:00
parent 19f1bb6eb8
commit 69f0380c3d
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 9 additions and 1 deletions

View File

@ -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
@ -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

View File

@ -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
}
}