diff --git a/crates/bevy_ptr/src/lib.rs b/crates/bevy_ptr/src/lib.rs index 51be4dff1e..5010c93135 100644 --- a/crates/bevy_ptr/src/lib.rs +++ b/crates/bevy_ptr/src/lib.rs @@ -314,7 +314,7 @@ impl<'a, A: IsAligned> Ptr<'a, A> { } } -impl<'a, T> From<&'a T> for Ptr<'a> { +impl<'a, T: ?Sized> From<&'a T> for Ptr<'a> { #[inline] fn from(val: &'a T) -> Self { // SAFETY: The returned pointer has the same lifetime as the passed reference. @@ -384,7 +384,7 @@ impl<'a, A: IsAligned> PtrMut<'a, A> { } } -impl<'a, T> From<&'a mut T> for PtrMut<'a> { +impl<'a, T: ?Sized> From<&'a mut T> for PtrMut<'a> { #[inline] fn from(val: &'a mut T) -> Self { // SAFETY: The returned pointer has the same lifetime as the passed reference.