]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/move-error-in-promoted-2.rs
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[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() {}