@@ -52,7 +52,7 @@ pub struct ReflectComponentFns {
52
52
/// Function pointer implementing [`ReflectComponent::reflect()`].
53
53
pub reflect : fn ( & World , Entity ) -> Option < & dyn Reflect > ,
54
54
/// Function pointer implementing [`ReflectComponent::reflect_mut()`].
55
- /// The function may only be called with a InteriorMutableWorld that can be used to access the relevant component on the given entity
55
+ /// SAFETY: The function may only be called with an InteriorMutableWorld that can be used to mutably access the relevant component on the given entity
56
56
pub reflect_mut : unsafe fn ( InteriorMutableWorld < ' _ > , Entity ) -> Option < Mut < ' _ , dyn Reflect > > ,
57
57
/// Function pointer implementing [`ReflectComponent::copy()`].
58
58
pub copy : fn ( & World , & mut World , Entity , Entity ) ,
@@ -124,7 +124,7 @@ impl ReflectComponent {
124
124
/// # Safety
125
125
/// This method does not prevent you from having two mutable pointers to the same data,
126
126
/// violating Rust's aliasing rules. To avoid this:
127
- /// * Only call this method with a [`InteriorMutableWorld`] that may be used to access the component on the entity `entity`
127
+ /// * Only call this method with a [`InteriorMutableWorld`] that may be used to mutably access the component on the entity `entity`
128
128
/// * Don't call this method more than once in the same scope for a given [`Component`].
129
129
pub unsafe fn reflect_unchecked_mut < ' a > (
130
130
& self ,
@@ -264,6 +264,7 @@ pub struct ReflectResourceFns {
264
264
/// Function pointer implementing [`ReflectResource::reflect()`].
265
265
pub reflect : fn ( & World ) -> Option < & dyn Reflect > ,
266
266
/// Function pointer implementing [`ReflectResource::reflect_unchecked_mut()`].
267
+ /// SAFETY: The function may only be called with an InteriorMutableWorld that can be used to mutably access the relevant resource
267
268
pub reflect_unchecked_mut : unsafe fn ( InteriorMutableWorld < ' _ > ) -> Option < Mut < ' _ , dyn Reflect > > ,
268
269
/// Function pointer implementing [`ReflectResource::copy()`].
269
270
pub copy : fn ( & World , & mut World ) ,
@@ -319,7 +320,7 @@ impl ReflectResource {
319
320
/// # Safety
320
321
/// This method does not prevent you from having two mutable pointers to the same data,
321
322
/// violating Rust's aliasing rules. To avoid this:
322
- /// * Only call this method with a [`InteriorMutableWorld`] which can be used to access the resource.
323
+ /// * Only call this method with a [`InteriorMutableWorld`] which can be used to mutably access the resource.
323
324
/// * Don't call this method more than once in the same scope for a given [`Resource`].
324
325
pub unsafe fn reflect_unchecked_mut < ' w > (
325
326
& self ,
0 commit comments