aboutsummaryrefslogtreecommitdiff
path: root/ui-tests/src/bin
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-25 13:04:38 +0100
committerMartin Fischer <martin@push-f.com>2021-11-25 13:40:30 +0100
commit88f33dee26815c3382bfb18c800f3f54b6397e20 (patch)
tree9f8a36a62ff0b6d64ffebe3fed04c8e1d37947a9 /ui-tests/src/bin
parentdc568083381d2073f0cfcfad8fa58158bd5bf811 (diff)
also detect <Self as Foo>::X in generic type args
Diffstat (limited to 'ui-tests/src/bin')
-rw-r--r--ui-tests/src/bin/qualified_self_opt.rs10
-rw-r--r--ui-tests/src/bin/qualified_self_opt.stderr5
2 files changed, 15 insertions, 0 deletions
diff --git a/ui-tests/src/bin/qualified_self_opt.rs b/ui-tests/src/bin/qualified_self_opt.rs
new file mode 100644
index 0000000..5de8b71
--- /dev/null
+++ b/ui-tests/src/bin/qualified_self_opt.rs
@@ -0,0 +1,10 @@
+trait Foo {
+ type X: Into<String>;
+}
+
+#[dynamize::dynamize]
+trait Bar: Foo {
+ fn test(&self) -> Option<<Self as Foo>::X>;
+}
+
+fn main() {}
diff --git a/ui-tests/src/bin/qualified_self_opt.stderr b/ui-tests/src/bin/qualified_self_opt.stderr
new file mode 100644
index 0000000..e032be5
--- /dev/null
+++ b/ui-tests/src/bin/qualified_self_opt.stderr
@@ -0,0 +1,5 @@
+error: dynamize does not support associated types of a qualified Self
+ --> src/bin/qualified_self_opt.rs:7:31
+ |
+7 | fn test(&self) -> Option<<Self as Foo>::X>;
+ | ^^^^