expand: Remove obsolete ExpansionConfig::keep_macs

Maybe it was used before the introduction of placeholders, but now it has no effect.
This commit is contained in:
Vadim Petrochenkov
2021-02-14 19:43:54 +03:00
parent 0038eaee6b
commit 18c94b3edd
2 changed files with 2 additions and 12 deletions

View File

@@ -371,12 +371,4 @@ impl<'a, 'b> MutVisitor for PlaceholderExpander<'a, 'b> {
}
}
}
fn visit_mod(&mut self, module: &mut ast::Mod) {
noop_visit_mod(module, self);
// remove macro definitions
module.items.retain(
|item| !matches!(item.kind, ast::ItemKind::MacCall(_) if !self.cx.ecfg.keep_macs),
);
}
}