add a test showing that you can write use fn

This commit is contained in:
Niko Matsakis 2018-10-05 10:39:55 -04:00
parent 8366b3a38b
commit c75e7e44f7
2 changed files with 15 additions and 1 deletions

View file

@ -316,7 +316,7 @@ macro_rules! query_group {
@query_fn[ @query_fn[
storage(input); storage(input);
method_name($method_name:ident); method_name($method_name:ident);
fn_path($($fn_path:tt)+); fn_path($fn_path:path);
$($rest:tt)* $($rest:tt)*
] ]
) => { ) => {

14
tests/macros.rs Normal file
View file

@ -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() {}