]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/move-error-in-promoted-2.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / borrowck / move-error-in-promoted-2.rs
1 // Regression test for #70934
2
3 struct S;
4
5 fn foo() {
6     &([S][0],);
7     //~^ ERROR cannot move out of type `[S; 1]`
8 }
9
10 fn main() {}