Closed
Description
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:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=35e9d30ae8a278601de5d8a45bc40417
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=850f363579a53b61b88c6b02a502c31b
Originally posted by @BoxyUwU in #133820 (comment)