aboutsummaryrefslogtreecommitdiff
path: root/ui-tests
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-25 16:56:44 +0100
committerMartin Fischer <martin@push-f.com>2021-11-26 11:45:53 +0100
commit74bcf35fc83c57fd7e9a31639d7dae31d4d9a050 (patch)
tree0084ecfa9f464505bbb3bfaa7b3899c11587dd2d /ui-tests
parent8046190e8f537407210fb87acbfe96d4084d58da (diff)
support dynamized supertraits via attribute
Diffstat (limited to 'ui-tests')
-rw-r--r--ui-tests/src/bin/attr_dynamized_duplicate.rs6
-rw-r--r--ui-tests/src/bin/attr_dynamized_duplicate.stderr5
-rw-r--r--ui-tests/src/bin/attr_dynamized_no_such_supertrait.rs5
-rw-r--r--ui-tests/src/bin/attr_dynamized_no_such_supertrait.stderr5
4 files changed, 21 insertions, 0 deletions
diff --git a/ui-tests/src/bin/attr_dynamized_duplicate.rs b/ui-tests/src/bin/attr_dynamized_duplicate.rs
new file mode 100644
index 0000000..fbe0d11
--- /dev/null
+++ b/ui-tests/src/bin/attr_dynamized_duplicate.rs
@@ -0,0 +1,6 @@
+#[dynamize::dynamize]
+#[dynamized(Foo)]
+#[dynamized(Foo)]
+trait Trait {}
+
+fn main() {}
diff --git a/ui-tests/src/bin/attr_dynamized_duplicate.stderr b/ui-tests/src/bin/attr_dynamized_duplicate.stderr
new file mode 100644
index 0000000..6ff67d1
--- /dev/null
+++ b/ui-tests/src/bin/attr_dynamized_duplicate.stderr
@@ -0,0 +1,5 @@
+error: dynamized attribute is defined multiple times
+ --> src/bin/attr_dynamized_duplicate.rs:3:13
+ |
+3 | #[dynamized(Foo)]
+ | ^^^
diff --git a/ui-tests/src/bin/attr_dynamized_no_such_supertrait.rs b/ui-tests/src/bin/attr_dynamized_no_such_supertrait.rs
new file mode 100644
index 0000000..5b298ea
--- /dev/null
+++ b/ui-tests/src/bin/attr_dynamized_no_such_supertrait.rs
@@ -0,0 +1,5 @@
+#[dynamize::dynamize]
+#[dynamized(Foo)]
+trait Trait {}
+
+fn main() {}
diff --git a/ui-tests/src/bin/attr_dynamized_no_such_supertrait.stderr b/ui-tests/src/bin/attr_dynamized_no_such_supertrait.stderr
new file mode 100644
index 0000000..b7e4cf4
--- /dev/null
+++ b/ui-tests/src/bin/attr_dynamized_no_such_supertrait.stderr
@@ -0,0 +1,5 @@
+error: this trait definition has no such supertrait
+ --> src/bin/attr_dynamized_no_such_supertrait.rs:2:13
+ |
+2 | #[dynamized(Foo)]
+ | ^^^