summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs')
-rw-r--r--src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs b/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs
new file mode 100644
index 000000000..b4fd6b3e7
--- /dev/null
+++ b/src/test/ui/impl-trait/projection-mismatch-in-impl-where-clause.rs
@@ -0,0 +1,20 @@
+pub trait Super {
+ type Assoc;
+}
+
+impl Super for () {
+ type Assoc = u8;
+}
+
+pub trait Test {}
+
+impl<T> Test for T where T: Super<Assoc = ()> {}
+
+fn test() -> impl Test {
+ //~^ERROR type mismatch resolving `<() as Super>::Assoc == ()`
+ ()
+}
+
+fn main() {
+ let a = test();
+}