From c5ec84205b1da77155732ecda1c6b27f2ada5595 Mon Sep 17 00:00:00 2001 From: Vincent Lafeychine <vincent.lafeychine@proton.me> Date: Tue, 30 Apr 2024 01:02:30 +0200 Subject: [PATCH] clippy: Fix expl-impl-clone-on-copy --- rr_frontend/.cargo/config.toml | 1 - rr_frontend/attribute_parse/src/parse.rs | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/rr_frontend/.cargo/config.toml b/rr_frontend/.cargo/config.toml index e98c7be5..2ce07d42 100644 --- a/rr_frontend/.cargo/config.toml +++ b/rr_frontend/.cargo/config.toml @@ -32,7 +32,6 @@ rustflags = [ "-Aclippy::string_lit_as_bytes", # clippy::pedantic - "-Aclippy::expl_impl_clone_on_copy", "-Aclippy::flat_map_option", "-Aclippy::from_iter_instead_of_collect", "-Aclippy::if_not_else", diff --git a/rr_frontend/attribute_parse/src/parse.rs b/rr_frontend/attribute_parse/src/parse.rs index 7c8cb1ed..aee9f8a1 100644 --- a/rr_frontend/attribute_parse/src/parse.rs +++ b/rr_frontend/attribute_parse/src/parse.rs @@ -248,6 +248,7 @@ macro_rules! define_punctuation_structs { $( #[repr(C)] #[$doc] + #[derive(Copy, Clone)] /// /// Don't try to remember the name of this type — use the /// [`MToken!`] macro instead. @@ -271,14 +272,6 @@ macro_rules! define_punctuation_structs { //} //} - impl Copy for $name {} - - impl Clone for $name { - fn clone(&self) -> Self { - *self - } - } - //impl Debug for $name { //fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { //f.write_str(stringify!($name)) -- GitLab