aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/item_tree.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-12-16 22:42:03 +0000
committerJonas Schievink <[email protected]>2020-12-16 22:42:03 +0000
commit28b5334580e5814d102b006e310ca0d1f03cdd72 (patch)
treeda9ac7abc2f426dbe2783aa7a2a29e57d17cddf8 /crates/hir_def/src/item_tree.rs
parent067067a6c11bb5afda98f5af14bfdec4744e7812 (diff)
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.
Diffstat (limited to 'crates/hir_def/src/item_tree.rs')
-rw-r--r--crates/hir_def/src/item_tree.rs8
1 files changed, 0 insertions, 8 deletions
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 {
646pub struct MacroRules { 646pub struct MacroRules {
647 /// The name of the declared macro. 647 /// The name of the declared macro.
648 pub name: Name, 648 pub name: Name,
649 /// Has `#[macro_export]`.
650 pub is_export: bool,
651 /// Has `#[macro_export(local_inner_macros)]`.
652 pub is_local_inner: bool,
653 /// Has `#[rustc_builtin_macro]`.
654 pub is_builtin: bool,
655 pub ast_id: FileAstId<ast::MacroRules>, 649 pub ast_id: FileAstId<ast::MacroRules>,
656} 650}
657 651
@@ -660,8 +654,6 @@ pub struct MacroRules {
660pub struct MacroDef { 654pub struct MacroDef {
661 pub name: Name, 655 pub name: Name,
662 pub visibility: RawVisibilityId, 656 pub visibility: RawVisibilityId,
663 /// Has `#[rustc_builtin_macro]`.
664 pub is_builtin: bool,
665 pub ast_id: FileAstId<ast::MacroDef>, 657 pub ast_id: FileAstId<ast::MacroDef>,
666} 658}
667 659