mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-02 09:46:06 +00:00
add a test showing that you can write use fn
This commit is contained in:
parent
8366b3a38b
commit
c75e7e44f7
2 changed files with 15 additions and 1 deletions
|
@ -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
14
tests/macros.rs
Normal 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() {}
|
Loading…
Reference in a new issue