Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/query-group-macro/tests/arity.rs')
-rw-r--r--crates/query-group-macro/tests/arity.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/crates/query-group-macro/tests/arity.rs b/crates/query-group-macro/tests/arity.rs
new file mode 100644
index 0000000000..440db7b821
--- /dev/null
+++ b/crates/query-group-macro/tests/arity.rs
@@ -0,0 +1,28 @@
+use query_group_macro::query_group;
+
+#[query_group]
+pub trait ArityDb: salsa::Database {
+ fn one(&self, a: ()) -> String;
+
+ fn two(&self, a: (), b: ()) -> String;
+
+ fn three(&self, a: (), b: (), c: ()) -> String;
+
+ fn none(&self) -> String;
+}
+
+fn one(_db: &dyn ArityDb, _a: ()) -> String {
+ String::new()
+}
+
+fn two(_db: &dyn ArityDb, _a: (), _b: ()) -> String {
+ String::new()
+}
+
+fn three(_db: &dyn ArityDb, _a: (), _b: (), _c: ()) -> String {
+ String::new()
+}
+
+fn none(_db: &dyn ArityDb) -> String {
+ String::new()
+}