2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2014-03-05 15:28:08 -08:00
|
|
|
|
2015-06-07 21:00:38 +03:00
|
|
|
fn test(foo: Box<Vec<isize>> ) { assert_eq!((*foo)[0], 10); }
|
2011-09-23 14:58:06 -07:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2021-08-25 02:39:40 +02:00
|
|
|
let x = Box::new(vec![10]);
|
2011-09-23 14:58:06 -07:00
|
|
|
// Test forgetting a local by move-in
|
2013-02-15 02:44:18 -08:00
|
|
|
test(x);
|
2011-09-23 14:58:06 -07:00
|
|
|
|
|
|
|
// Test forgetting a temporary by move-in.
|
2021-08-25 02:39:40 +02:00
|
|
|
test(Box::new(vec![10]));
|
2011-09-23 14:58:06 -07:00
|
|
|
}
|