summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unique/unique-assign-generic.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/unique/unique-assign-generic.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/unique/unique-assign-generic.rs b/src/test/ui/unique/unique-assign-generic.rs
new file mode 100644
index 000000000..d4932d833
--- /dev/null
+++ b/src/test/ui/unique/unique-assign-generic.rs
@@ -0,0 +1,11 @@
+// run-pass
+
+fn f<T>(t: T) -> T {
+ let t1 = t;
+ t1
+}
+
+pub fn main() {
+ let t = f::<Box<_>>(Box::new(100));
+ assert_eq!(t, Box::new(100));
+}