diff --git a/src/lib.rs b/src/lib.rs index 0cd2d446..138b5f5c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -316,7 +316,7 @@ macro_rules! query_group { @query_fn[ storage(input); method_name($method_name:ident); - fn_path($($fn_path:tt)+); + fn_path($fn_path:path); $($rest:tt)* ] ) => { diff --git a/tests/macros.rs b/tests/macros.rs new file mode 100644 index 00000000..62daace7 --- /dev/null +++ b/tests/macros.rs @@ -0,0 +1,14 @@ +salsa::query_group! { + trait MyDatabase: salsa::Database { + fn my_query(key: ()) -> () { + type MyQuery; + use fn another_module::another_name; + } + } +} + +mod another_module { + pub(crate) fn another_name(_: &impl crate::MyDatabase, (): ()) -> () {} +} + +fn main() {}