mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-26 00:36:51 +00:00
This reverts commit 6d2b84b3ed7848fd91b8d6151d4451b3103ed816, reversing changes made to 73bc12199ea8c7651ed98b069c0dd6b0bb5fabcf.
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() {}
|