summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/issue-63591.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-types/issue-63591.rs')
-rw-r--r--src/test/ui/associated-types/issue-63591.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/associated-types/issue-63591.rs b/src/test/ui/associated-types/issue-63591.rs
new file mode 100644
index 000000000..4d2e39f4d
--- /dev/null
+++ b/src/test/ui/associated-types/issue-63591.rs
@@ -0,0 +1,24 @@
+// check-pass
+
+#![feature(associated_type_bounds)]
+#![feature(type_alias_impl_trait)]
+
+fn main() {}
+
+trait Bar { type Assoc; }
+
+trait Thing {
+ type Out;
+ fn func() -> Self::Out;
+}
+
+struct AssocIsCopy;
+impl Bar for AssocIsCopy { type Assoc = u8; }
+
+impl Thing for AssocIsCopy {
+ type Out = impl Bar<Assoc: Copy>;
+
+ fn func() -> Self::Out {
+ AssocIsCopy
+ }
+}