diff options
Diffstat (limited to 'tests/ui/borrowck/move-error-in-promoted-2.rs')
-rw-r--r-- | tests/ui/borrowck/move-error-in-promoted-2.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/borrowck/move-error-in-promoted-2.rs b/tests/ui/borrowck/move-error-in-promoted-2.rs new file mode 100644 index 000000000..13da34f39 --- /dev/null +++ b/tests/ui/borrowck/move-error-in-promoted-2.rs @@ -0,0 +1,10 @@ +// Regression test for #70934 + +struct S; + +fn foo() { + &([S][0],); + //~^ ERROR cannot move out of type `[S; 1]` +} + +fn main() {} |