aboutsummaryrefslogtreecommitdiff
path: root/ui-tests
diff options
context:
space:
mode:
Diffstat (limited to 'ui-tests')
-rw-r--r--ui-tests/src/bin/attr_convert_duplicate.rs8
-rw-r--r--ui-tests/src/bin/attr_convert_duplicate.stderr5
-rw-r--r--ui-tests/src/bin/qualified_self.stderr6
-rw-r--r--ui-tests/src/bin/qualified_self_opt.stderr6
4 files changed, 19 insertions, 6 deletions
diff --git a/ui-tests/src/bin/attr_convert_duplicate.rs b/ui-tests/src/bin/attr_convert_duplicate.rs
new file mode 100644
index 0000000..b074d81
--- /dev/null
+++ b/ui-tests/src/bin/attr_convert_duplicate.rs
@@ -0,0 +1,8 @@
+#[dynamize::dynamize]
+#[convert = |x: Foo| -> Bar {x.baz()}]
+#[convert = |x: Foo| -> Bar {x.baz()}]
+trait Trait {
+ fn test(&self) -> Foo;
+}
+
+fn main() {}
diff --git a/ui-tests/src/bin/attr_convert_duplicate.stderr b/ui-tests/src/bin/attr_convert_duplicate.stderr
new file mode 100644
index 0000000..e4f3622
--- /dev/null
+++ b/ui-tests/src/bin/attr_convert_duplicate.stderr
@@ -0,0 +1,5 @@
+error: conversion is defined multiple times for this type
+ --> src/bin/attr_convert_duplicate.rs:3:17
+ |
+3 | #[convert = |x: Foo| -> Bar {x.baz()}]
+ | ^^^
diff --git a/ui-tests/src/bin/qualified_self.stderr b/ui-tests/src/bin/qualified_self.stderr
index d8c3a37..87dc0c2 100644
--- a/ui-tests/src/bin/qualified_self.stderr
+++ b/ui-tests/src/bin/qualified_self.stderr
@@ -1,5 +1,5 @@
-error: dynamize does not support Self qualified as another trait
- --> src/bin/qualified_self.rs:7:32
+error: dynamize does not know how to convert this type (you can tell it with #[convert])
+ --> src/bin/qualified_self.rs:7:23
|
7 | fn test(&self) -> <Self as Foo>::X;
- | ^^^
+ | ^
diff --git a/ui-tests/src/bin/qualified_self_opt.stderr b/ui-tests/src/bin/qualified_self_opt.stderr
index dd99406..e20e9c3 100644
--- a/ui-tests/src/bin/qualified_self_opt.stderr
+++ b/ui-tests/src/bin/qualified_self_opt.stderr
@@ -1,5 +1,5 @@
-error: dynamize does not support Self qualified as another trait
- --> src/bin/qualified_self_opt.rs:7:39
+error: dynamize does not know how to convert this type (you can tell it with #[convert])
+ --> src/bin/qualified_self_opt.rs:7:29
|
7 | fn test(&self) -> Option<<Self as Foo>::X>;
- | ^^^
+ | ^^