macros: Add missing automatically_derived attributes

This commit is contained in:
Jonas Platte 2022-03-15 17:02:28 +01:00
parent 26ffa5e5c8
commit cdc6b9a2aa
No known key found for this signature in database
GPG Key ID: BBA95679259D342F
2 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ pub fn expand_deserialize_from_cow_str(ident: &Ident) -> syn::Result<TokenStream
let ruma_common = import_ruma_common(); let ruma_common = import_ruma_common();
Ok(quote! { Ok(quote! {
#[automatically_derived]
impl<'de> #ruma_common::exports::serde::de::Deserialize<'de> for #ident { impl<'de> #ruma_common::exports::serde::de::Deserialize<'de> for #ident {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error> fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where where

View File

@ -68,6 +68,7 @@ pub fn expand_enum_from_string(input: &ItemEnum) -> syn::Result<TokenStream> {
} }
Ok(quote! { Ok(quote! {
#[automatically_derived]
impl<T> ::std::convert::From<T> for #enum_name impl<T> ::std::convert::From<T> for #enum_name
where where
T: ::std::convert::AsRef<::std::primitive::str> T: ::std::convert::AsRef<::std::primitive::str>