2019-07-26 00:57:42 -05:00
|
|
|
//@ check-pass
|
2019-03-22 12:33:12 -05:00
|
|
|
|
|
|
|
trait Gen<T> {
|
|
|
|
fn gen(x: Self) -> T;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct A;
|
|
|
|
|
|
|
|
impl Gen<[(); 0]> for A {
|
|
|
|
fn gen(x: Self) -> [(); 0] {
|
|
|
|
[]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn array() -> impl Gen<[(); 0]> {
|
|
|
|
A
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let [] = Gen::gen(array());
|
|
|
|
}
|