]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/move-arg-2-unique.rs
Move /src/test to /tests
[rust.git] / tests / ui / moves / move-arg-2-unique.rs
1 // run-pass
2
3 fn test(foo: Box<Vec<isize>> ) { assert_eq!((*foo)[0], 10); }
4
5 pub fn main() {
6     let x = Box::new(vec![10]);
7     // Test forgetting a local by move-in
8     test(x);
9
10     // Test forgetting a temporary by move-in.
11     test(Box::new(vec![10]));
12 }