summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/issue-43784-associated-type.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/associated-types/issue-43784-associated-type.rs')
-rw-r--r--src/test/ui/associated-types/issue-43784-associated-type.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/associated-types/issue-43784-associated-type.rs b/src/test/ui/associated-types/issue-43784-associated-type.rs
new file mode 100644
index 000000000..78815d8d3
--- /dev/null
+++ b/src/test/ui/associated-types/issue-43784-associated-type.rs
@@ -0,0 +1,17 @@
+pub trait Partial<X: ?Sized>: Copy {
+}
+
+pub trait Complete {
+ type Assoc: Partial<Self>;
+}
+
+impl<T> Partial<T> for T::Assoc where
+ T: Complete
+{
+}
+
+impl<T> Complete for T {
+ type Assoc = T; //~ ERROR the trait bound `T: Copy` is not satisfied
+}
+
+fn main() {}