f9f354fc XL |
1 | // Regression test for #70934 |
2 | |
3 | fn f() { |
4 | const C: [S2; 1] = [S2]; |
5 | let _ = S1(C[0]).clone(); |
6 | //~^ ERROR cannot move out of type `[S2; 1]` |
7 | } |
8 | |
9 | #[derive(Clone)] |
10 | struct S1(S2); |
11 | |
12 | #[derive(Clone)] |
13 | struct S2; |
14 | |
15 | fn main() { |
16 | f(); |
17 | } |