Skip to content

Commit f73c6d1

Browse files
better error message on failed derive (#1491)
Before, when deriving `SystemLabel` for a type without `Clone`, the error message was: ``` the trait `SystemLabel` is not implemented for `&TransformSystem` ``` Now it is ``` the trait `Clone` is not implemented for `TransformSystem` ``` which directly shows what's needed to fix the problem.
1 parent 3319195 commit f73c6d1

File tree

1 file changed

+1
-1
lines changed
  • crates/bevy_ecs/macros/src

1 file changed

+1
-1
lines changed

crates/bevy_ecs/macros/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ fn derive_label(input: DeriveInput, label_type: Ident) -> TokenStream2 {
503503
quote! {
504504
impl #crate_path::#label_type for #ident {
505505
fn dyn_clone(&self) -> Box<dyn #crate_path::#label_type> {
506-
Box::new(self.clone())
506+
Box::new(Clone::clone(self))
507507
}
508508
}
509509
}

0 commit comments

Comments
 (0)