1
Fork 0
rust/tests/ui/moves/move-arg-2.rs

13 lines
259 B
Rust
Raw Normal View History

//@ run-pass
2013-10-23 04:49:18 -04:00
fn test(foo: Box<Vec<isize>>) { assert_eq!((*foo)[0], 10); }
pub fn main() {
let x = Box::new(vec![10]);
// Test forgetting a local by move-in
2013-02-15 02:44:18 -08:00
test(x);
// Test forgetting a temporary by move-in.
test(Box::new(vec![10]));
}