//@ revisions: current next //@ ignore-compare-mode-next-solver (explicit revisions) //@[next] compile-flags: -Znext-solver //@ check-fail // // Make sure we can't trick the compiler by using a projection. trait Cat<'a> {} impl Cat<'_> for () {} trait Id { type Id: ?Sized; } impl Id for T { type Id = T; } struct S { tail: ::Id, } fn m<'a>() { let unsend: *const dyn Cat<'a> = &(); let _send = unsend as *const S>; //~^ error: lifetime may not live long enough } fn main() { m(); }