diff options
author | Lukas Wirth <[email protected]> | 2021-06-09 17:02:31 +0100 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-06-09 17:27:08 +0100 |
commit | ae8d74ab2caed66dc84f64f6859bdf3f131388e1 (patch) | |
tree | e2cd48d719266092d8a87810ec385c9caeae5c2d /crates/hir_def/src | |
parent | 5f592f4f58a6e1e1db0f920af34a2f569b65017c (diff) |
Implement dummy expansions for builtin attributes
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r-- | crates/hir_def/src/nameres/collector.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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}; | |||
9 | use cfg::{CfgExpr, CfgOptions}; | 9 | use cfg::{CfgExpr, CfgOptions}; |
10 | use hir_expand::{ | 10 | use hir_expand::{ |
11 | ast_id_map::FileAstId, | 11 | ast_id_map::FileAstId, |
12 | builtin_attr::find_builtin_attr, | ||
12 | builtin_derive::find_builtin_derive, | 13 | builtin_derive::find_builtin_derive, |
13 | builtin_macro::find_builtin_macro, | 14 | builtin_macro::find_builtin_macro, |
14 | name::{name, AsName, Name}, | 15 | name::{name, AsName, Name}, |
@@ -1836,7 +1837,8 @@ impl ModCollector<'_, '_> { | |||
1836 | let attrs = self.item_tree.attrs(self.def_collector.db, krate, ModItem::from(id).into()); | 1837 | let attrs = self.item_tree.attrs(self.def_collector.db, krate, ModItem::from(id).into()); |
1837 | if attrs.by_key("rustc_builtin_macro").exists() { | 1838 | if attrs.by_key("rustc_builtin_macro").exists() { |
1838 | let macro_id = find_builtin_macro(&mac.name, krate, ast_id) | 1839 | let macro_id = find_builtin_macro(&mac.name, krate, ast_id) |
1839 | .or_else(|| find_builtin_derive(&mac.name, krate, ast_id)); | 1840 | .or_else(|| find_builtin_derive(&mac.name, krate, ast_id)) |
1841 | .or_else(|| find_builtin_attr(&mac.name, krate, ast_id)); | ||
1840 | 1842 | ||
1841 | match macro_id { | 1843 | match macro_id { |
1842 | Some(macro_id) => { | 1844 | Some(macro_id) => { |