File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ use bevy_reflect_derive::impl_type_path;
68
68
///
69
69
/// [`dyn PartialReflect`]: PartialReflect
70
70
/// [derives `Reflect`]: derive@crate::Reflect
71
+ #[ diagnostic:: on_unimplemented(
72
+ message = "`{Self}` does not implement `CastPartialReflect` so cannot be cast to `dyn PartialReflect`" ,
73
+ note = "consider annotating `{Self}` with `#[derive(Reflect)]`"
74
+ ) ]
71
75
pub trait CastPartialReflect : Send + Sync + ' static {
72
76
/// Casts this type to a [`dyn PartialReflect`] reference.
73
77
///
@@ -112,6 +116,10 @@ impl<T: ?Sized + CastPartialReflect> CastPartialReflect for Box<T> {
112
116
///
113
117
/// [`dyn Reflect`]: Reflect
114
118
/// [derives `Reflect`]: derive@crate::Reflect
119
+ #[ diagnostic:: on_unimplemented(
120
+ message = "`{Self}` does not implement `CastReflect` so cannot be cast to `dyn Reflect`" ,
121
+ note = "consider annotating `{Self}` with `#[derive(Reflect)]`"
122
+ ) ]
115
123
pub trait CastReflect : CastPartialReflect {
116
124
/// Casts this type to a [`dyn Reflect`] reference.
117
125
///
You can’t perform that action at this time.
0 commit comments