Skip to content

Commit f542d4a

Browse files
committed
fix docs for compiler builtin macros
1 parent 1727dee commit f542d4a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/macros.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ pub mod builtin {
473473
/// leads to less duplicated code.
474474
///
475475
/// The syntax given to this macro is the same syntax as the `cfg`
476-
/// attribute.
476+
/// attribute (so `$cfg:meta` is not _exactly_ correct).
477477
///
478478
/// # Examples
479479
///
@@ -486,7 +486,7 @@ pub mod builtin {
486486
/// ```
487487
#[stable(feature = "rust1", since = "1.0.0")]
488488
#[macro_export]
489-
macro_rules! cfg { ($cfg:tt) => ({ /* compiler built-in */ }) }
489+
macro_rules! cfg { ($cfg:meta) => ({ /* compiler built-in */ }) }
490490

491491
/// Parse the current given file as an expression.
492492
///
@@ -501,5 +501,5 @@ pub mod builtin {
501501
/// ```
502502
#[stable(feature = "rust1", since = "1.0.0")]
503503
#[macro_export]
504-
macro_rules! include { ($cfg:tt) => ({ /* compiler built-in */ }) }
504+
macro_rules! include { ($file:expr) => ({ /* compiler built-in */ }) }
505505
}

0 commit comments

Comments
 (0)