Skip to content

Commit 7278108

Browse files
bors[bot]Brandon
andauthored
Merge #8352
8352: Remove dead legacy macro expansion code r=lnicola a=brandondong I was investigating some unrelated macro issue when I noticed this dead code. This legacy macro expansion logic was changed in #8128. Co-authored-by: Brandon <[email protected]>
2 parents 453f236 + 4dbec2d commit 7278108

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

crates/hir_def/src/nameres/collector.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ struct MacroDirective {
215215

216216
#[derive(Clone, Debug, Eq, PartialEq)]
217217
enum MacroDirectiveKind {
218-
FnLike { ast_id: AstIdWithPath<ast::MacroCall>, legacy: Option<MacroCallId> },
218+
FnLike { ast_id: AstIdWithPath<ast::MacroCall> },
219219
Derive { ast_id: AstIdWithPath<ast::Item> },
220220
}
221221

@@ -806,13 +806,7 @@ impl DefCollector<'_> {
806806
let mut res = ReachedFixedPoint::Yes;
807807
macros.retain(|directive| {
808808
match &directive.kind {
809-
MacroDirectiveKind::FnLike { ast_id, legacy } => {
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-
809+
MacroDirectiveKind::FnLike { ast_id } => {
816810
match macro_call_as_call_id(
817811
ast_id,
818812
self.db,
@@ -1535,7 +1529,7 @@ impl ModCollector<'_, '_> {
15351529
self.def_collector.unexpanded_macros.push(MacroDirective {
15361530
module_id: self.module_id,
15371531
depth: self.macro_depth + 1,
1538-
kind: MacroDirectiveKind::FnLike { ast_id, legacy: None },
1532+
kind: MacroDirectiveKind::FnLike { ast_id },
15391533
});
15401534
}
15411535

0 commit comments

Comments
 (0)