mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 20:31:59 +00:00
Split out salsa_macros
Does not do much yet due to tracing pulling syn but oh well
This commit is contained in:
parent
9fa647c129
commit
996d6ed1a3
25 changed files with 63 additions and 48 deletions
|
|
@ -178,7 +178,7 @@ pub(crate) fn query_group_impl(
|
|||
let supertraits = &item_trait.supertraits;
|
||||
|
||||
let db_attr: Attribute = parse_quote! {
|
||||
#[salsa::db]
|
||||
#[salsa_macros::db]
|
||||
};
|
||||
item_trait.attrs.push(db_attr);
|
||||
|
||||
|
|
@ -407,7 +407,7 @@ pub(crate) fn query_group_impl(
|
|||
.collect::<Vec<proc_macro2::TokenStream>>();
|
||||
|
||||
let input_struct = quote! {
|
||||
#[salsa::input]
|
||||
#[salsa_macros::input]
|
||||
pub(crate) struct #input_struct_name {
|
||||
#(#fields),*
|
||||
}
|
||||
|
|
@ -418,7 +418,7 @@ pub(crate) fn query_group_impl(
|
|||
|
||||
let create_data_method = quote! {
|
||||
#[allow(non_snake_case)]
|
||||
#[salsa::tracked]
|
||||
#[salsa_macros::tracked]
|
||||
fn #create_data_ident(db: &dyn #trait_name_ident) -> #input_struct_name {
|
||||
#input_struct_name::new(db, #(#field_params),*)
|
||||
}
|
||||
|
|
@ -443,7 +443,7 @@ pub(crate) fn query_group_impl(
|
|||
item_trait.items.append(&mut lookup_signatures);
|
||||
|
||||
let trait_impl = quote! {
|
||||
#[salsa::db]
|
||||
#[salsa_macros::db]
|
||||
impl<DB> #trait_name_ident for DB
|
||||
where
|
||||
DB: #supertraits,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue