]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/self_normalization2.rs
Auto merge of #64546 - weiznich:bugfix/rfc-2451-rerebalance-tests, r=nikomatsakis
[rust.git] / src / test / ui / consts / self_normalization2.rs
1 // check-pass
2
3 trait Gen<T> {
4     fn gen(x: Self) -> T;
5 }
6
7 struct A;
8
9 impl Gen<[(); 0]> for A {
10     fn gen(x: Self) -> [(); 0] {
11         []
12     }
13 }
14
15 fn array() -> impl Gen<[(); 0]> {
16     A
17 }
18
19 fn main() {
20     let [] = Gen::gen(array());
21 }