diff options
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r-- | crates/hir_def/src/nameres/collector.rs | 12 |
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 4ddc791ce..f42f92702 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs | |||
@@ -215,7 +215,7 @@ struct MacroDirective { | |||
215 | 215 | ||
216 | #[derive(Clone, Debug, Eq, PartialEq)] | 216 | #[derive(Clone, Debug, Eq, PartialEq)] |
217 | enum MacroDirectiveKind { | 217 | enum MacroDirectiveKind { |
218 | FnLike { ast_id: AstIdWithPath<ast::MacroCall>, legacy: Option<MacroCallId> }, | 218 | FnLike { ast_id: AstIdWithPath<ast::MacroCall> }, |
219 | Derive { ast_id: AstIdWithPath<ast::Item> }, | 219 | Derive { ast_id: AstIdWithPath<ast::Item> }, |
220 | } | 220 | } |
221 | 221 | ||
@@ -806,13 +806,7 @@ impl DefCollector<'_> { | |||
806 | let mut res = ReachedFixedPoint::Yes; | 806 | let mut res = ReachedFixedPoint::Yes; |
807 | macros.retain(|directive| { | 807 | macros.retain(|directive| { |
808 | match &directive.kind { | 808 | match &directive.kind { |
809 | MacroDirectiveKind::FnLike { ast_id, legacy } => { | 809 | MacroDirectiveKind::FnLike { ast_id } => { |
810 | if let Some(call_id) = legacy { | ||
811 | res = ReachedFixedPoint::No; | ||
812 | resolved.push((directive.module_id, *call_id, directive.depth)); | ||
813 | return false; | ||
814 | } | ||
815 | |||
816 | match macro_call_as_call_id( | 810 | match macro_call_as_call_id( |
817 | ast_id, | 811 | ast_id, |
818 | self.db, | 812 | self.db, |
@@ -1535,7 +1529,7 @@ impl ModCollector<'_, '_> { | |||
1535 | self.def_collector.unexpanded_macros.push(MacroDirective { | 1529 | self.def_collector.unexpanded_macros.push(MacroDirective { |
1536 | module_id: self.module_id, | 1530 | module_id: self.module_id, |
1537 | depth: self.macro_depth + 1, | 1531 | depth: self.macro_depth + 1, |
1538 | kind: MacroDirectiveKind::FnLike { ast_id, legacy: None }, | 1532 | kind: MacroDirectiveKind::FnLike { ast_id }, |
1539 | }); | 1533 | }); |
1540 | } | 1534 | } |
1541 | 1535 | ||