aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def')
-rw-r--r--crates/hir_def/src/nameres/collector.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index d8fabe49b..f4e2bda86 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -207,7 +207,7 @@ struct MacroDirective {
207 207
208#[derive(Clone, Debug, Eq, PartialEq)] 208#[derive(Clone, Debug, Eq, PartialEq)]
209enum MacroDirectiveKind { 209enum MacroDirectiveKind {
210 FnLike { ast_id: AstIdWithPath<ast::MacroCall>, legacy: Option<MacroCallId> }, 210 FnLike { ast_id: AstIdWithPath<ast::MacroCall> },
211 Derive { ast_id: AstIdWithPath<ast::Item> }, 211 Derive { ast_id: AstIdWithPath<ast::Item> },
212} 212}
213 213
@@ -783,13 +783,7 @@ impl DefCollector<'_> {
783 let mut res = ReachedFixedPoint::Yes; 783 let mut res = ReachedFixedPoint::Yes;
784 macros.retain(|directive| { 784 macros.retain(|directive| {
785 match &directive.kind { 785 match &directive.kind {
786 MacroDirectiveKind::FnLike { ast_id, legacy } => { 786 MacroDirectiveKind::FnLike { ast_id } => {
787 if let Some(call_id) = legacy {
788 res = ReachedFixedPoint::No;
789 resolved.push((directive.module_id, *call_id, directive.depth));
790 return false;
791 }
792
793 match macro_call_as_call_id( 787 match macro_call_as_call_id(
794 ast_id, 788 ast_id,
795 self.db, 789 self.db,
@@ -1493,7 +1487,7 @@ impl ModCollector<'_, '_> {
1493 self.def_collector.unexpanded_macros.push(MacroDirective { 1487 self.def_collector.unexpanded_macros.push(MacroDirective {
1494 module_id: self.module_id, 1488 module_id: self.module_id,
1495 depth: self.macro_depth + 1, 1489 depth: self.macro_depth + 1,
1496 kind: MacroDirectiveKind::FnLike { ast_id, legacy: None }, 1490 kind: MacroDirectiveKind::FnLike { ast_id },
1497 }); 1491 });
1498 } 1492 }
1499 1493