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.
This commit is contained in:
parent
3319195f90
commit
f73c6d18ef
@ -503,7 +503,7 @@ fn derive_label(input: DeriveInput, label_type: Ident) -> TokenStream2 {
|
|||||||
quote! {
|
quote! {
|
||||||
impl #crate_path::#label_type for #ident {
|
impl #crate_path::#label_type for #ident {
|
||||||
fn dyn_clone(&self) -> Box<dyn #crate_path::#label_type> {
|
fn dyn_clone(&self) -> Box<dyn #crate_path::#label_type> {
|
||||||
Box::new(self.clone())
|
Box::new(Clone::clone(self))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user