mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 07:10:29 +00:00
Suppress various pedantic clippy lints
This commit is contained in:
parent
19f1bb6eb8
commit
69f0380c3d
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user