From 4dbec2d5453dacdc699a5801114fcd7a3fbcc635 Mon Sep 17 00:00:00 2001 From: Brandon Date: Mon, 5 Apr 2021 11:47:06 -0700 Subject: Remove dead legacy macro expansion code --- crates/hir_def/src/nameres/collector.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'crates/hir_def/src') 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 { #[derive(Clone, Debug, Eq, PartialEq)] enum MacroDirectiveKind { - FnLike { ast_id: AstIdWithPath, legacy: Option }, + FnLike { ast_id: AstIdWithPath }, Derive { ast_id: AstIdWithPath }, } @@ -783,13 +783,7 @@ impl DefCollector<'_> { let mut res = ReachedFixedPoint::Yes; macros.retain(|directive| { match &directive.kind { - MacroDirectiveKind::FnLike { ast_id, legacy } => { - if let Some(call_id) = legacy { - res = ReachedFixedPoint::No; - resolved.push((directive.module_id, *call_id, directive.depth)); - return false; - } - + MacroDirectiveKind::FnLike { ast_id } => { match macro_call_as_call_id( ast_id, self.db, @@ -1493,7 +1487,7 @@ impl ModCollector<'_, '_> { self.def_collector.unexpanded_macros.push(MacroDirective { module_id: self.module_id, depth: self.macro_depth + 1, - kind: MacroDirectiveKind::FnLike { ast_id, legacy: None }, + kind: MacroDirectiveKind::FnLike { ast_id }, }); } -- cgit v1.2.3