summaryrefslogtreecommitdiffstats
path: root/tests/ui/associated-types/issue-19883.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/associated-types/issue-19883.rs')
-rw-r--r--tests/ui/associated-types/issue-19883.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/associated-types/issue-19883.rs b/tests/ui/associated-types/issue-19883.rs
new file mode 100644
index 000000000..5cf422043
--- /dev/null
+++ b/tests/ui/associated-types/issue-19883.rs
@@ -0,0 +1,16 @@
+trait From<Src> {
+ type Output;
+
+ fn from(src: Src) -> <Self as From<Src>>::Output;
+}
+
+trait To: Sized {
+ fn to<Dst: From<Self>>(self) ->
+ <Dst as From<Self>>::Dst
+ //~^ ERROR cannot find associated type `Dst` in trait `From`
+ {
+ From::from(self)
+ }
+}
+
+fn main() {}