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:
parent
0038eaee6b
commit
18c94b3edd
2 changed files with 2 additions and 12 deletions
|
@ -1615,7 +1615,6 @@ pub struct ExpansionConfig<'feat> {
|
||||||
pub recursion_limit: Limit,
|
pub recursion_limit: Limit,
|
||||||
pub trace_mac: bool,
|
pub trace_mac: bool,
|
||||||
pub should_test: bool, // If false, strip `#[test]` nodes
|
pub should_test: bool, // If false, strip `#[test]` nodes
|
||||||
pub keep_macs: bool,
|
|
||||||
pub span_debug: bool, // If true, use verbose debugging for `proc_macro::Span`
|
pub span_debug: bool, // If true, use verbose debugging for `proc_macro::Span`
|
||||||
pub proc_macro_backtrace: bool, // If true, show backtraces for proc-macro panics
|
pub proc_macro_backtrace: bool, // If true, show backtraces for proc-macro panics
|
||||||
}
|
}
|
||||||
|
@ -1628,7 +1627,6 @@ impl<'feat> ExpansionConfig<'feat> {
|
||||||
recursion_limit: Limit::new(1024),
|
recursion_limit: Limit::new(1024),
|
||||||
trace_mac: false,
|
trace_mac: false,
|
||||||
should_test: false,
|
should_test: false,
|
||||||
keep_macs: false,
|
|
||||||
span_debug: false,
|
span_debug: false,
|
||||||
proc_macro_backtrace: false,
|
proc_macro_backtrace: false,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue