2016-11-04 15:55:05 +01:00
|
|
|
#![feature(box_syntax)]
|
|
|
|
|
2022-06-20 16:00:37 -07:00
|
|
|
fn test(foo: Box<Vec<isize>>) {
|
|
|
|
assert_eq!((*foo)[0], 10);
|
|
|
|
}
|
2016-11-04 15:55:05 +01:00
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
let x = box vec![10];
|
|
|
|
// Test forgetting a local by move-in
|
|
|
|
test(x);
|
|
|
|
}
|