summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unique/unique-move-drop.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/unique/unique-move-drop.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/unique/unique-move-drop.rs b/src/test/ui/unique/unique-move-drop.rs
new file mode 100644
index 000000000..c0f5d8f90
--- /dev/null
+++ b/src/test/ui/unique/unique-move-drop.rs
@@ -0,0 +1,10 @@
+// run-pass
+
+#![allow(unused_variables)]
+
+pub fn main() {
+ let i: Box<_> = Box::new(100);
+ let j: Box<_> = Box::new(200);
+ let j = i;
+ assert_eq!(*j, 100);
+}