mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 04:39:16 +00:00
16 lines
363 B
Rust
16 lines
363 B
Rust
//@ revisions: current next
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
//@[next] compile-flags: -Znext-solver
|
|
|
|
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
|
|
//~^ ERROR cannot cast `dyn A` to `dyn B`, trait upcasting coercion is experimental
|
|
}
|
|
|
|
fn main() {}
|