mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
16 lines
260 B
Rust
16 lines
260 B
Rust
//! Test that we allow unsizing `Foo<[Opaque; N]>` to `Foo<[Concrete]>`.
|
|
|
|
//@check-pass
|
|
|
|
struct Foo<T: ?Sized>(T);
|
|
|
|
fn hello() -> Foo<[impl Sized; 2]> {
|
|
if false {
|
|
let x = hello();
|
|
let _: &Foo<[i32]> = &x;
|
|
}
|
|
todo!()
|
|
}
|
|
|
|
fn main() {}
|