From 0b29d26079f8e4bb76069b2e3d9c0d8e0f689acf Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Sat, 6 May 2017 23:26:45 -0400 Subject: Add compile_error! Related to #40872 --- src/libsyntax/ext/expand.rs | 1 + src/libsyntax/feature_gate.rs | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index c91c77719e6..f8a26287bd4 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -1065,6 +1065,7 @@ impl<'feat> ExpansionConfig<'feat> { fn enable_allow_internal_unstable = allow_internal_unstable, fn enable_custom_derive = custom_derive, fn proc_macro_enabled = proc_macro, + fn enable_compile_error = compile_error, } } diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 4543378789d..d7d3a70f3c7 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -111,6 +111,7 @@ macro_rules! declare_features { declare_features! ( (active, asm, "1.0.0", Some(29722)), + (active, compile_error, "1.20.0", Some(40872)), (active, concat_idents, "1.0.0", Some(29599)), (active, link_args, "1.0.0", Some(29596)), (active, log_syntax, "1.0.0", Some(29598)), @@ -1008,6 +1009,9 @@ pub const EXPLAIN_LOG_SYNTAX: &'static str = pub const EXPLAIN_CONCAT_IDENTS: &'static str = "`concat_idents` is not stable enough for use and is subject to change"; +pub const EXPLAIN_COMPILE_ERROR: &'static str = + "`compile_error` is not stable enough for use and is subject to change"; + pub const EXPLAIN_TRACE_MACROS: &'static str = "`trace_macros` is not stable enough for use and is subject to change"; pub const EXPLAIN_ALLOW_INTERNAL_UNSTABLE: &'static str = -- cgit 1.4.1-3-g733a5