about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-03-19 06:09:56 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-03-19 08:49:37 +0530
commitf5c61a78999717e9ed34887948cd3de4d7e153d2 (patch)
treefbc3890bdff054ae4194da3e4a07a7baa5e3cb77
parent19b40f72bf3c0457e0fd99c47041ea965dba3dc9 (diff)
parentf8c63d00e2c0cd4ab1178eb72e2f799840608eae (diff)
downloadrust-f5c61a78999717e9ed34887948cd3de4d7e153d2.tar.gz
rust-f5c61a78999717e9ed34887948cd3de4d7e153d2.zip
Rollup merge of #23496 - steveklabnik:gh22309, r=nikomatsakis
 Fixes #22309

I am pretty sure that this is the right way to do this, given the other macros, but I'm not 100% sure.
-rw-r--r--src/libstd/macros.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index e1ef3062794..f4a7e8b1b98 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -404,4 +404,18 @@ pub mod builtin {
     /// ```
     #[macro_export]
     macro_rules! cfg { ($cfg:tt) => ({ /* compiler built-in */ }) }
+
+    /// Parse the current given file as an expression.
+    ///
+    /// This is generally a bad idea, because it's going to behave unhygenically.
+    ///
+    /// # Examples
+    ///
+    /// ```ignore
+    /// fn foo() {
+    ///     include!("/path/to/a/file")
+    /// }
+    /// ```
+    #[macro_export]
+    macro_rules! include { ($cfg:tt) => ({ /* compiler built-in */ }) }
 }