]> git.lizzy.rs Git - rust.git/commitdiff
Test for #1255
authorDavid Wickes <dave.wickes@gmail.com>
Thu, 23 Feb 2017 22:18:09 +0000 (22:18 +0000)
committerDavid Wickes <dave.wickes@gmail.com>
Sun, 26 Feb 2017 22:27:46 +0000 (22:27 +0000)
Default annotation incorrectly removed on associated type.

tests/target/issue-1255.rs [new file with mode: 0644]

diff --git a/tests/target/issue-1255.rs b/tests/target/issue-1255.rs
new file mode 100644 (file)
index 0000000..2d46338
--- /dev/null
@@ -0,0 +1,10 @@
+// Test for issue #1255
+// Default annotation incorrectly removed on associated types
+#![feature(specialization)]
+
+trait Trait {
+    type Type;
+}
+impl<T> Trait for T {
+    default type Type = u64; // 'default' should not be removed
+}