about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/macros.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 496c014f70e..82c4f0830a6 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -238,6 +238,16 @@ macro_rules! assert_approx_eq {
 /// into libsyntax itself.
 #[cfg(dox)]
 pub mod builtin {
+
+    /// Unconditionally causes compilation to fail with the given error message when encountered.
+    ///
+    /// For more information, see the [RFC].
+    ///
+    /// [RFC]: https://github.com/rust-lang/rfcs/blob/master/text/1695-add-error-macro.md
+    #[unstable(feature = "compile_error_macro", issue = "40872")]
+    #[macro_export]
+    macro_rules! compile_error { ($msg:expr) => ({ /* compiler built-in */ }) }
+
     /// The core macro for formatted string creation & output.
     ///
     /// This macro produces a value of type [`fmt::Arguments`]. This value can be