From ae8d74ab2caed66dc84f64f6859bdf3f131388e1 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 9 Jun 2021 18:02:31 +0200 Subject: Implement dummy expansions for builtin attributes --- crates/hir_def/src/nameres/collector.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/hir_def') diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index d019ba3a9..93f30f23d 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs @@ -9,6 +9,7 @@ use base_db::{CrateId, Edition, FileId, ProcMacroId}; use cfg::{CfgExpr, CfgOptions}; use hir_expand::{ ast_id_map::FileAstId, + builtin_attr::find_builtin_attr, builtin_derive::find_builtin_derive, builtin_macro::find_builtin_macro, name::{name, AsName, Name}, @@ -1836,7 +1837,8 @@ impl ModCollector<'_, '_> { let attrs = self.item_tree.attrs(self.def_collector.db, krate, ModItem::from(id).into()); if attrs.by_key("rustc_builtin_macro").exists() { let macro_id = find_builtin_macro(&mac.name, krate, ast_id) - .or_else(|| find_builtin_derive(&mac.name, krate, ast_id)); + .or_else(|| find_builtin_derive(&mac.name, krate, ast_id)) + .or_else(|| find_builtin_attr(&mac.name, krate, ast_id)); match macro_id { Some(macro_id) => { -- cgit v1.2.3