]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-consume-unsize-vec.rs
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / ui / borrowck / borrowck-consume-unsize-vec.rs
1 // Check that we report an error if an upcast box is moved twice.
2
3 fn consume(_: Box<[i32]>) {
4 }
5
6 fn foo(b: Box<[i32;5]>) {
7     consume(b);
8     consume(b); //~ ERROR use of moved value
9 }
10
11 fn main() {
12 }