mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
13 lines
202 B
Rust
13 lines
202 B
Rust
// Check that we report an error if an upcast box is moved twice.
|
|
|
|
fn consume(_: Box<[i32]>) {
|
|
}
|
|
|
|
fn foo(b: Box<[i32;5]>) {
|
|
consume(b);
|
|
consume(b); //~ ERROR use of moved value
|
|
}
|
|
|
|
fn main() {
|
|
}
|