blob: 4b6bf0eb5168ed35db98576b903ff1775029841e [file] [log] [blame]
// Make sure borrowck doesn't ICE because it thinks a pointer cast is a metadata-preserving
// wide-to-wide ptr cast when it's actually (falsely) a wide-to-thin ptr cast due to an
// impossible dyn sized bound.
//@ check-pass
trait Trait<T> {}
fn func<'a>(x: *const (dyn Trait<()> + 'a))
where
dyn Trait<u8> + 'a: Sized,
{
let _x: *const dyn Trait<u8> = x as _;
}
fn main() {}