rust/tests/ui/impl-trait/unsize_adt.rs

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

16 lines
260 B
Rust
Raw Normal View History

//! Test that we allow unsizing `Foo<[Opaque; N]>` to `Foo<[Concrete]>`.
//@check-pass
2024-05-23 10:46:56 -05:00
struct Foo<T: ?Sized>(T);
fn hello() -> Foo<[impl Sized; 2]> {
if false {
let x = hello();
let _: &Foo<[i32]> = &x;
}
todo!()
}
fn main() {}