CoerceUnsized builtin checks do not handle aliases · Issue #135214 · rust-lang/rust (original) (raw)

          The `CoerceUnsized` builtin checks that the parameter being unsized is only used in `PhantomData`s and one field does not handle aliases and just directly checks if the `Ty` is a `PhantomData`. This will have to be fixed before stabilizing `lazy_type_alias` so we may as well just handle it from the beginning. See the following two playground examples for things that don't compile but probably ought to before we stabilize any form of user written impls for the trait: