//@ revisions: old next //@[next] compile-flags: -Znext-solver=coherence #![feature(coerce_unsized)] #![feature(unsize)] use std::marker::Unsize; use std::ops::CoerceUnsized; struct Wrapper(T); impl<'a, 'b, T, S> CoerceUnsized<&'a Wrapper> for &'b Wrapper where S: Unsize {} //~^ ERROR lifetime of the source pointer does not outlive lifetime bound of the object type [E0476] //~^^ ERROR E0119 fn main() {}