Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/builtin/attr_macro.rs')
-rw-r--r--crates/hir-expand/src/builtin/attr_macro.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/crates/hir-expand/src/builtin/attr_macro.rs b/crates/hir-expand/src/builtin/attr_macro.rs
index 9b13f9fb00..540b3e66ce 100644
--- a/crates/hir-expand/src/builtin/attr_macro.rs
+++ b/crates/hir-expand/src/builtin/attr_macro.rs
@@ -1,8 +1,9 @@
//! Builtin attributes.
+use base_db::SourceDatabase;
use intern::sym;
use span::Span;
-use crate::{ExpandResult, MacroCallId, MacroCallKind, db::ExpandDatabase, name, tt};
+use crate::{ExpandResult, MacroCallId, MacroCallKind, name, tt};
use super::quote;
@@ -14,7 +15,7 @@ macro_rules! register_builtin {
}
impl BuiltinAttrExpander {
- pub fn expander(&self) -> fn (&dyn ExpandDatabase, MacroCallId, &tt::TopSubtree, Span) -> ExpandResult<tt::TopSubtree> {
+ pub fn expander(&self) -> fn (&dyn SourceDatabase, MacroCallId, &tt::TopSubtree, Span) -> ExpandResult<tt::TopSubtree> {
match *self {
$( BuiltinAttrExpander::$variant => $expand, )*
}
@@ -34,7 +35,7 @@ macro_rules! register_builtin {
impl BuiltinAttrExpander {
pub fn expand(
&self,
- db: &dyn ExpandDatabase,
+ db: &dyn SourceDatabase,
id: MacroCallId,
tt: &tt::TopSubtree,
span: Span,
@@ -74,7 +75,7 @@ pub fn find_builtin_attr(ident: &name::Name) -> Option<BuiltinAttrExpander> {
}
fn dummy_attr_expand(
- _db: &dyn ExpandDatabase,
+ _db: &dyn SourceDatabase,
_id: MacroCallId,
tt: &tt::TopSubtree,
_span: Span,
@@ -83,7 +84,7 @@ fn dummy_attr_expand(
}
fn dummy_gate_test_expand(
- _db: &dyn ExpandDatabase,
+ _db: &dyn SourceDatabase,
_id: MacroCallId,
tt: &tt::TopSubtree,
span: Span,
@@ -117,7 +118,7 @@ fn dummy_gate_test_expand(
/// So this hacky approach is a lot more friendly for us, though it does require a bit of support in
/// hir::Semantics to make this work.
fn derive_expand(
- db: &dyn ExpandDatabase,
+ db: &dyn SourceDatabase,
id: MacroCallId,
tt: &tt::TopSubtree,
span: Span,