summaryrefslogtreecommitdiffstats
path: root/tests/ui/moves/move-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/moves/move-2.rs')
-rw-r--r--tests/ui/moves/move-2.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/moves/move-2.rs b/tests/ui/moves/move-2.rs
new file mode 100644
index 000000000..5e0100874
--- /dev/null
+++ b/tests/ui/moves/move-2.rs
@@ -0,0 +1,6 @@
+// run-pass
+#![allow(dead_code)]
+
+struct X { x: isize, y: isize, z: isize }
+
+pub fn main() { let x: Box<_> = Box::new(X {x: 1, y: 2, z: 3}); let y = x; assert_eq!(y.y, 2); }