2019-07-26 05:57:42 +00:00
|
|
|
// check-pass
|
2019-03-22 17:33:12 +00: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());
|
|
|
|
}
|