From dc0797c0c99e7079170d0e09f82fc6f66b721932 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Sun, 15 Feb 2015 23:49:55 +0100 Subject: 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). --- src/libsyntax/ext/log_syntax.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libsyntax/ext/log_syntax.rs') diff --git a/src/libsyntax/ext/log_syntax.rs b/src/libsyntax/ext/log_syntax.rs index 30301e3b8cc..8173dd93f74 100644 --- a/src/libsyntax/ext/log_syntax.rs +++ b/src/libsyntax/ext/log_syntax.rs @@ -11,12 +11,20 @@ use ast; use codemap; use ext::base; +use feature_gate; use print; pub fn expand_syntax_ext<'cx>(cx: &'cx mut base::ExtCtxt, sp: codemap::Span, tts: &[ast::TokenTree]) -> Box { + if !cx.ecfg.enable_log_syntax() { + feature_gate::emit_feature_err(&cx.parse_sess.span_diagnostic, + "log_syntax", + sp, + feature_gate::EXPLAIN_LOG_SYNTAX); + return base::DummyResult::any(sp); + } cx.print_backtrace(); -- cgit 1.4.1-3-g733a5