]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/self_normalization2.rs
Rollup merge of #106873 - BoxyUwU:ty_const_formatting, r=compiler-errors
[rust.git] / tests / 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 }