summaryrefslogtreecommitdiffstats
path: root/tests/ui/generics/generic-fn-unique.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generics/generic-fn-unique.rs')
-rw-r--r--tests/ui/generics/generic-fn-unique.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/generics/generic-fn-unique.rs b/tests/ui/generics/generic-fn-unique.rs
new file mode 100644
index 000000000..7e246bce9
--- /dev/null
+++ b/tests/ui/generics/generic-fn-unique.rs
@@ -0,0 +1,8 @@
+// run-pass
+
+fn f<T>(x: Box<T>) -> Box<T> { return x; }
+
+pub fn main() {
+ let x = f(Box::new(3));
+ println!("{}", *x);
+}