9a20cf1697
This reverts commit6d2b84b3ed
, reversing changes made to73bc12199e
.
15 lines
304 B
Rust
15 lines
304 B
Rust
// revisions: current next
|
|
//[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() {}
|