2023-07-28 20:04:04 -05:00
|
|
|
//@ revisions: current next
|
2024-03-10 20:18:41 -05:00
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
2023-12-14 06:11:28 -06:00
|
|
|
//@[next] compile-flags: -Znext-solver
|
2023-07-28 20:04:04 -05:00
|
|
|
|
|
|
|
struct Wrapper<T: ?Sized>(T);
|
|
|
|
|
|
|
|
trait A: B {}
|
|
|
|
trait B {}
|
|
|
|
|
|
|
|
fn test<'a>(x: Box<Wrapper<dyn A + 'a>>) -> Box<Wrapper<dyn B + 'a>> {
|
|
|
|
x
|
2024-01-22 06:23:50 -06:00
|
|
|
//~^ ERROR cannot cast `dyn A` to `dyn B`, trait upcasting coercion is experimental
|
2023-07-28 20:04:04 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|