Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ptr
: allow Ptr
and PtrMut
construction for references to values…
… of `?Sized` types (bevyengine#14479) # Objective - Currently `bevy_ptr::{Ptr, PtrMut}` have `From` implementations from references. - These implementations impose an implicit `Sized` bound so `bevy_ptr` types cannot be created from references to slices and trait objects. - I ran into this trying to use `Ptr<'static>` as an untyped `&'static dyn Any`, and [had to work around it](https://github.com/soqb/perfect-reflect/blob/f32b41512c77ad2d7e0f126b0a0fdf388e3e4717/src/registry.rs#L214-L219). ## Solution - Relax the `Sized` bound on the relevant `From` implementations.
- Loading branch information