]> git.lizzy.rs Git - rust.git/commitdiff
fix docs for compiler builtin macros
authorAlex Burka <durka42+github@gmail.com>
Fri, 27 Nov 2015 03:45:55 +0000 (22:45 -0500)
committerAlex Burka <durka42+github@gmail.com>
Fri, 27 Nov 2015 03:45:55 +0000 (22:45 -0500)
src/libstd/macros.rs

index efeb59b4ac74cb8e2d6cbcb01b60ae3ea3affdbb..b56eb46fc805c8834dbd6b8ee91fcb3366dafe61 100644 (file)
@@ -473,7 +473,7 @@ macro_rules! module_path { () => ({ /* compiler built-in */ }) }
     /// leads to less duplicated code.
     ///
     /// The syntax given to this macro is the same syntax as the `cfg`
-    /// attribute.
+    /// attribute (so `$cfg:meta` is not _exactly_ correct).
     ///
     /// # Examples
     ///
@@ -486,7 +486,7 @@ macro_rules! module_path { () => ({ /* compiler built-in */ }) }
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[macro_export]
-    macro_rules! cfg { ($cfg:tt) => ({ /* compiler built-in */ }) }
+    macro_rules! cfg { ($cfg:meta) => ({ /* compiler built-in */ }) }
 
     /// Parse the current given file as an expression.
     ///
@@ -501,5 +501,5 @@ macro_rules! cfg { ($cfg:tt) => ({ /* compiler built-in */ }) }
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[macro_export]
-    macro_rules! include { ($cfg:tt) => ({ /* compiler built-in */ }) }
+    macro_rules! include { ($file:expr) => ({ /* compiler built-in */ }) }
 }