summaryrefslogtreecommitdiffstats
path: root/tests/ui/unique/unique-fn-arg-move.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unique/unique-fn-arg-move.rs')
-rw-r--r--tests/ui/unique/unique-fn-arg-move.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/unique/unique-fn-arg-move.rs b/tests/ui/unique/unique-fn-arg-move.rs
new file mode 100644
index 000000000..6d42df218
--- /dev/null
+++ b/tests/ui/unique/unique-fn-arg-move.rs
@@ -0,0 +1,10 @@
+// run-pass
+
+fn f(i: Box<isize>) {
+ assert_eq!(*i, 100);
+}
+
+pub fn main() {
+ let i = Box::new(100);
+ f(i);
+}