diff --git a/components/salsa-macros/src/database_storage.rs b/components/salsa-macros/src/database_storage.rs index 93395213..addba13d 100644 --- a/components/salsa-macros/src/database_storage.rs +++ b/components/salsa-macros/src/database_storage.rs @@ -62,9 +62,9 @@ pub(crate) fn database(args: TokenStream, input: TokenStream) -> TokenStream { #group_name_snake: #group_storage, }); has_group_impls.extend(quote! { - impl ::salsa::plumbing::HasQueryGroup<#group_path> for #database_name { + impl salsa::plumbing::HasQueryGroup<#group_path> for #database_name { fn group_storage(db: &Self) -> &#group_storage { - let runtime = ::salsa::Database::salsa_runtime(db); + let runtime = salsa::Database::salsa_runtime(db); &runtime.storage().#group_name_snake } @@ -98,7 +98,7 @@ pub(crate) fn database(args: TokenStream, input: TokenStream) -> TokenStream { // For each query `fn foo() for FooType` create // // ``` - // foo(>::Key), + // foo(>::Key), // ``` let mut variants = proc_macro2::TokenStream::new(); for (query_group, group_key) in query_groups.iter().zip(&query_group_key_names) { @@ -116,7 +116,7 @@ pub(crate) fn database(args: TokenStream, input: TokenStream) -> TokenStream { // output.extend(quote! { - impl ::salsa::plumbing::DatabaseStorageTypes for #database_name { + impl salsa::plumbing::DatabaseStorageTypes for #database_name { type DatabaseKey = __SalsaDatabaseKey; type DatabaseStorage = __SalsaDatabaseStorage; } @@ -134,10 +134,10 @@ pub(crate) fn database(args: TokenStream, input: TokenStream) -> TokenStream { }); } output.extend(quote! { - impl ::salsa::plumbing::DatabaseOps for #database_name { + impl salsa::plumbing::DatabaseOps for #database_name { fn for_each_query( &self, - mut op: impl FnMut(&dyn ::salsa::plumbing::QueryStorageMassOps), + mut op: impl FnMut(&dyn salsa::plumbing::QueryStorageMassOps), ) { #for_each_ops } @@ -157,11 +157,11 @@ pub(crate) fn database(args: TokenStream, input: TokenStream) -> TokenStream { } output.extend(quote! { - impl ::salsa::plumbing::DatabaseKey<#database_name> for __SalsaDatabaseKey { + impl salsa::plumbing::DatabaseKey<#database_name> for __SalsaDatabaseKey { fn maybe_changed_since( &self, db: &#database_name, - revision: ::salsa::plumbing::Revision, + revision: salsa::plumbing::Revision, ) -> bool { match &self.kind { #for_each_query_desc diff --git a/components/salsa-macros/src/query_group.rs b/components/salsa-macros/src/query_group.rs index 346003ca..c6f69de5 100644 --- a/components/salsa-macros/src/query_group.rs +++ b/components/salsa-macros/src/query_group.rs @@ -152,7 +152,7 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream query_fn_definitions.extend(quote! { fn #fn_name(&self, #(#key_names: #keys),*) -> #value { - >::get_query_table(self).get((#(#key_names),*)) + >::get_query_table(self).get((#(#key_names),*)) } }); @@ -185,11 +185,11 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream query_fn_definitions.extend(quote! { fn #set_fn_name(&mut self, #(#key_names: #keys,)* value__: #value) { - >::get_query_table_mut(self).set((#(#key_names),*), value__) + >::get_query_table_mut(self).set((#(#key_names),*), value__) } fn #set_constant_fn_name(&mut self, #(#key_names: #keys,)* value__: #value) { - >::get_query_table_mut(self).set_constant((#(#key_names),*), value__) + >::get_query_table_mut(self).set_constant((#(#key_names),*), value__) } }); } @@ -202,10 +202,10 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream // A variant for the group descriptor below query_descriptor_maybe_change.extend(quote! { #group_key::#fn_name(key) => { - let group_storage: &#group_storage = ::salsa::plumbing::HasQueryGroup::group_storage(db); + let group_storage: &#group_storage = salsa::plumbing::HasQueryGroup::group_storage(db); let storage = &group_storage.#fn_name; - <_ as ::salsa::plumbing::QueryStorageOps>::maybe_changed_since( + <_ as salsa::plumbing::QueryStorageOps>::maybe_changed_since( storage, db, revision, @@ -219,7 +219,7 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream // // FIXME(#120): the pub should not be necessary once we complete the transition storage_fields.extend(quote! { - pub #fn_name: <#qt as ::salsa::Query>::Storage, + pub #fn_name: <#qt as salsa::Query>::Storage, }); } @@ -255,7 +255,7 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream impl #trait_name for T where T: #bounds, - T: ::salsa::plumbing::HasQueryGroup<#group_struct> + T: salsa::plumbing::HasQueryGroup<#group_struct> { #query_fn_definitions } @@ -344,12 +344,12 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream #trait_vis fn maybe_changed_since( &self, db: &DB__, - db_descriptor: &::DatabaseKey, - revision: ::salsa::plumbing::Revision, + db_descriptor: &::DatabaseKey, + revision: salsa::plumbing::Revision, ) -> bool where DB__: #trait_name, - DB__: ::salsa::plumbing::HasQueryGroup<#group_struct>, + DB__: salsa::plumbing::HasQueryGroup<#group_struct>, { match self { #query_descriptor_maybe_change @@ -375,12 +375,12 @@ pub(crate) fn query_group(args: TokenStream, input: TokenStream) -> TokenStream impl #group_storage where DB__: #trait_name, - DB__: ::salsa::plumbing::HasQueryGroup<#group_struct>, + DB__: salsa::plumbing::HasQueryGroup<#group_struct>, { #trait_vis fn for_each_query( &self, db: &DB__, - mut op: &mut dyn FnMut(&dyn ::salsa::plumbing::QueryStorageMassOps), + mut op: &mut dyn FnMut(&dyn salsa::plumbing::QueryStorageMassOps), ) { #for_each_ops }