diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/type_uuid.rs b/crates/bevy_reflect/bevy_reflect_derive/src/type_uuid.rs index 800de584f71071..257bafac7006ca 100644 --- a/crates/bevy_reflect/bevy_reflect_derive/src/type_uuid.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/type_uuid.rs @@ -15,6 +15,7 @@ pub fn type_uuid_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStre // Build the trait implementation let name = &ast.ident; + let (impl_generics, type_generics, where_clause) = &ast.generics.split_for_impl(); let mut uuid = None; for attribute in ast.attrs.iter().filter_map(|attr| attr.parse_meta().ok()) { @@ -53,7 +54,7 @@ pub fn type_uuid_derive(input: proc_macro::TokenStream) -> proc_macro::TokenStre .map(|byte_str| syn::parse_str::(&byte_str).unwrap()); let gen = quote! { - impl #bevy_reflect_path::TypeUuid for #name { + impl #impl_generics #bevy_reflect_path::TypeUuid for #name #type_generics #where_clause { const TYPE_UUID: #bevy_reflect_path::Uuid = #bevy_reflect_path::Uuid::from_bytes([ #( #bytes ),* ]);