From 69f6e59990f63e92ecf682419df14917bf819018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Przytu=C5=82a?= Date: Sun, 8 Dec 2024 09:04:01 +0100 Subject: [PATCH] macros: generate automatically_derived attribute It is customary that auto-generated trait impls have that attribute. Also, this disables dead code analysis for derived impls. --- scylla-macros/src/deserialize/mod.rs | 1 + scylla-macros/src/serialize/row.rs | 1 + scylla-macros/src/serialize/value.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/scylla-macros/src/deserialize/mod.rs b/scylla-macros/src/deserialize/mod.rs index 2eb1819e4..074f37d8b 100644 --- a/scylla-macros/src/deserialize/mod.rs +++ b/scylla-macros/src/deserialize/mod.rs @@ -115,6 +115,7 @@ where let items = items.into_iter(); parse_quote! { + #[automatically_derived] impl<#frame_lifetime, #metadata_lifetime, #impl_generics> #trait_<#frame_lifetime, #metadata_lifetime> for #struct_name #ty_generics where #(#predicates),* diff --git a/scylla-macros/src/serialize/row.rs b/scylla-macros/src/serialize/row.rs index ffa2c7a2b..a1695fa57 100644 --- a/scylla-macros/src/serialize/row.rs +++ b/scylla-macros/src/serialize/row.rs @@ -102,6 +102,7 @@ pub(crate) fn derive_serialize_row(tokens_input: TokenStream) -> Result