Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/expr_store/expander.rs')
| -rw-r--r-- | crates/hir-def/src/expr_store/expander.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/crates/hir-def/src/expr_store/expander.rs b/crates/hir-def/src/expr_store/expander.rs index 23b9712d1e..6a2f06b0a6 100644 --- a/crates/hir-def/src/expr_store/expander.rs +++ b/crates/hir-def/src/expr_store/expander.rs @@ -17,11 +17,10 @@ use syntax::{AstNode, Parse, ast}; use triomphe::Arc; use tt::TextRange; -use crate::attr::Attrs; -use crate::expr_store::HygieneId; -use crate::macro_call_as_call_id; -use crate::nameres::DefMap; -use crate::{MacroId, UnresolvedMacro, db::DefDatabase}; +use crate::{ + MacroId, UnresolvedMacro, attrs::AttrFlags, db::DefDatabase, expr_store::HygieneId, + macro_call_as_call_id, nameres::DefMap, +}; #[derive(Debug)] pub(super) struct Expander { @@ -70,11 +69,10 @@ impl Expander { pub(super) fn is_cfg_enabled( &self, - db: &dyn DefDatabase, - has_attrs: &dyn HasAttrs, + owner: &dyn HasAttrs, cfg_options: &CfgOptions, ) -> Result<(), cfg::CfgExpr> { - Attrs::is_cfg_enabled_for(db, has_attrs, self.span_map.as_ref(), cfg_options) + AttrFlags::is_cfg_enabled_for(owner, cfg_options) } pub(super) fn call_syntax_ctx(&self) -> SyntaxContext { |