Address the other cases of #22234; fix #22234.

The other cases: `concat_idents!`, `log_syntax!`, and `trace_macros!`,
(these macros, with `asm!`, are handled (eagerly) in feature_gate.rs).
This commit is contained in:
Felix S. Klock II
2015-02-15 23:49:55 +01:00
parent 52bdda778a
commit dc0797c0c9
11 changed files with 199 additions and 6 deletions

View File

@@ -1436,6 +1436,27 @@ impl<'feat> ExpansionConfig<'feat> {
_ => false,
}
}
pub fn enable_log_syntax(&self) -> bool {
match self.features {
Some(&Features { allow_log_syntax: true, .. }) => true,
_ => false,
}
}
pub fn enable_concat_idents(&self) -> bool {
match self.features {
Some(&Features { allow_concat_idents: true, .. }) => true,
_ => false,
}
}
pub fn enable_trace_macros(&self) -> bool {
match self.features {
Some(&Features { allow_trace_macros: true, .. }) => true,
_ => false,
}
}
}
pub fn expand_crate<'feat>(parse_sess: &parse::ParseSess,