From 28b5334580e5814d102b006e310ca0d1f03cdd72 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Wed, 16 Dec 2020 23:42:03 +0100 Subject: Avoid querying attributes in item tree lowering ItemTree is per-file, so there is no unique crate associated with it. This means that it cannot know the active CfgOptions and thus couldn't handle `cfg_attr`. Prepare it for `cfg_attr`s by avoiding accessing attributes. --- crates/hir_def/src/item_tree.rs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'crates/hir_def/src/item_tree.rs') diff --git a/crates/hir_def/src/item_tree.rs b/crates/hir_def/src/item_tree.rs index 8cd0b18cc..b8e09e3af 100644 --- a/crates/hir_def/src/item_tree.rs +++ b/crates/hir_def/src/item_tree.rs @@ -646,12 +646,6 @@ pub struct MacroCall { pub struct MacroRules { /// The name of the declared macro. pub name: Name, - /// Has `#[macro_export]`. - pub is_export: bool, - /// Has `#[macro_export(local_inner_macros)]`. - pub is_local_inner: bool, - /// Has `#[rustc_builtin_macro]`. - pub is_builtin: bool, pub ast_id: FileAstId, } @@ -660,8 +654,6 @@ pub struct MacroRules { pub struct MacroDef { pub name: Name, pub visibility: RawVisibilityId, - /// Has `#[rustc_builtin_macro]`. - pub is_builtin: bool, pub ast_id: FileAstId, } -- cgit v1.2.3