macros: Add missing automatically_derived attributes
This commit is contained in:
		
							parent
							
								
									26ffa5e5c8
								
							
						
					
					
						commit
						cdc6b9a2aa
					
				| @ -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 | ||||||
|  | |||||||
| @ -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> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user