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