summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-inherent-types/struct-generics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-inherent-types/struct-generics.rs')
-rw-r--r--src/test/ui/associated-inherent-types/struct-generics.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/associated-inherent-types/struct-generics.rs b/src/test/ui/associated-inherent-types/struct-generics.rs
new file mode 100644
index 000000000..8952b3791
--- /dev/null
+++ b/src/test/ui/associated-inherent-types/struct-generics.rs
@@ -0,0 +1,15 @@
+// check-pass
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct S<T>(T);
+
+impl<T> S<T> {
+ type P = T;
+}
+
+fn main() {
+ type A = S<()>::P;
+ let _: A = ();
+}