rust/tests/ui/consts/self_normalization2.rs

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

22 lines
239 B
Rust
Raw Normal View History

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());
}