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