about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-03-18 19:49:39 -0400
committerManish Goregaokar <manishsmail@gmail.com>2015-03-19 08:24:41 +0530
commitf8c63d00e2c0cd4ab1178eb72e2f799840608eae (patch)
tree65ecc650d62afd231bb732b2ce1272c60bdd6248 /src/libstd
parent12cb7c6a2847959460ecac75b2c983d071585472 (diff)
downloadrust-f8c63d00e2c0cd4ab1178eb72e2f799840608eae.tar.gz
rust-f8c63d00e2c0cd4ab1178eb72e2f799840608eae.zip
Document include!
Fixes #22309
Diffstat (limited to 'src/libstd')
-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 */ }) }
 }