Files
rust/tests/ui/traits/trait-upcasting/upcast-through-struct-tail.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
230 B
Rust
Raw Normal View History

// check-pass
// revisions: current next
2023-12-14 13:11:28 +01:00
//[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() {}