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