rust/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs
2023-12-14 15:22:37 +01:00

15 lines
230 B
Rust

// check-pass
// 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
}
fn main() {}