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() {
|
|
}
|