aboutsummaryrefslogtreecommitdiff
path: root/ui-tests/src/bin
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-22 15:57:17 +0100
committerMartin Fischer <martin@push-f.com>2021-11-22 15:57:17 +0100
commit346113bbebddbd199b61249957c7569514071e89 (patch)
tree82a1978a60faf93a00b5cc9ed4aa4f182b3d037f /ui-tests/src/bin
parenta0ec23e259359bbbd115d6159193a361c8ce24df (diff)
support other collections via #[collection(...)]
Diffstat (limited to 'ui-tests/src/bin')
-rw-r--r--ui-tests/src/bin/attr_collection_duplicate.rs6
-rw-r--r--ui-tests/src/bin/attr_collection_duplicate.stderr5
-rw-r--r--ui-tests/src/bin/attr_collection_zero.rs5
-rw-r--r--ui-tests/src/bin/attr_collection_zero.stderr5
4 files changed, 21 insertions, 0 deletions
diff --git a/ui-tests/src/bin/attr_collection_duplicate.rs b/ui-tests/src/bin/attr_collection_duplicate.rs
new file mode 100644
index 0000000..27e412d
--- /dev/null
+++ b/ui-tests/src/bin/attr_collection_duplicate.rs
@@ -0,0 +1,6 @@
+#[dynamize::dynamize]
+#[collection(Foo, 1)]
+#[collection(Foo, 2)]
+trait Trait {}
+
+fn main() {}
diff --git a/ui-tests/src/bin/attr_collection_duplicate.stderr b/ui-tests/src/bin/attr_collection_duplicate.stderr
new file mode 100644
index 0000000..7d91236
--- /dev/null
+++ b/ui-tests/src/bin/attr_collection_duplicate.stderr
@@ -0,0 +1,5 @@
+error: collection `Foo` is defined multiple times for this trait
+ --> src/bin/attr_collection_duplicate.rs:3:14
+ |
+3 | #[collection(Foo, 2)]
+ | ^^^
diff --git a/ui-tests/src/bin/attr_collection_zero.rs b/ui-tests/src/bin/attr_collection_zero.rs
new file mode 100644
index 0000000..6f45ea8
--- /dev/null
+++ b/ui-tests/src/bin/attr_collection_zero.rs
@@ -0,0 +1,5 @@
+#[dynamize::dynamize]
+#[collection(Foo, 0)]
+trait Trait {}
+
+fn main() {}
diff --git a/ui-tests/src/bin/attr_collection_zero.stderr b/ui-tests/src/bin/attr_collection_zero.stderr
new file mode 100644
index 0000000..47a87c9
--- /dev/null
+++ b/ui-tests/src/bin/attr_collection_zero.stderr
@@ -0,0 +1,5 @@
+error: number of type parameters must be >= 1
+ --> src/bin/attr_collection_zero.rs:2:19
+ |
+2 | #[collection(Foo, 0)]
+ | ^