]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/move-error-in-promoted.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / borrowck / move-error-in-promoted.rs
CommitLineData
f9f354fc
XL
1// Regression test for #70934
2
3fn 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)]
10struct S1(S2);
11
12#[derive(Clone)]
13struct S2;
14
15fn main() {
16 f();
17}