diff options
| author | Michael Lamparski <diagonaldevice@gmail.com> | 2018-02-07 10:24:34 -0500 |
|---|---|---|
| committer | Michael Lamparski <diagonaldevice@gmail.com> | 2018-02-07 12:48:25 -0500 |
| commit | b7c6dc6c0600eaee4d149c63dd3cf1faa00a098f (patch) | |
| tree | c0d281416e5c1019889fa6c7d429952043942efc /src/libstd/macros.rs | |
| parent | 1137fb193583971f35e1d4b3cfcb25725948da4f (diff) | |
| download | rust-b7c6dc6c0600eaee4d149c63dd3cf1faa00a098f.tar.gz rust-b7c6dc6c0600eaee4d149c63dd3cf1faa00a098f.zip | |
update the builtin macro doc stubs
Diffstat (limited to 'src/libstd/macros.rs')
| -rw-r--r-- | src/libstd/macros.rs | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 5a01674a3d0..a18c811d196 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -315,7 +315,10 @@ pub mod builtin { /// ``` #[stable(feature = "compile_error_macro", since = "1.20.0")] #[macro_export] - macro_rules! compile_error { ($msg:expr) => ({ /* compiler built-in */ }) } + macro_rules! compile_error { + ($msg:expr) => ({ /* compiler built-in */ }); + ($msg:expr,) => ({ /* compiler built-in */ }); + } /// The core macro for formatted string creation & output. /// @@ -403,7 +406,10 @@ pub mod builtin { /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[macro_export] - macro_rules! option_env { ($name:expr) => ({ /* compiler built-in */ }) } + macro_rules! option_env { + ($name:expr) => ({ /* compiler built-in */ }); + ($name:expr,) => ({ /* compiler built-in */ }); + } /// Concatenate identifiers into one identifier. /// @@ -583,7 +589,10 @@ pub mod builtin { /// Compiling 'main.rs' and running the resulting binary will print "adiรณs". #[stable(feature = "rust1", since = "1.0.0")] #[macro_export] - macro_rules! include_str { ($file:expr) => ({ /* compiler built-in */ }) } + macro_rules! include_str { + ($file:expr) => ({ /* compiler built-in */ }); + ($file:expr,) => ({ /* compiler built-in */ }); + } /// Includes a file as a reference to a byte array. /// @@ -617,7 +626,10 @@ pub mod builtin { /// Compiling 'main.rs' and running the resulting binary will print "adiรณs". #[stable(feature = "rust1", since = "1.0.0")] #[macro_export] - macro_rules! include_bytes { ($file:expr) => ({ /* compiler built-in */ }) } + macro_rules! include_bytes { + ($file:expr) => ({ /* compiler built-in */ }); + ($file:expr,) => ({ /* compiler built-in */ }); + } /// Expands to a string that represents the current module path. /// @@ -703,7 +715,10 @@ pub mod builtin { /// "๐๐๐๐๐๐". #[stable(feature = "rust1", since = "1.0.0")] #[macro_export] - macro_rules! include { ($file:expr) => ({ /* compiler built-in */ }) } + macro_rules! include { + ($file:expr) => ({ /* compiler built-in */ }); + ($file:expr,) => ({ /* compiler built-in */ }); + } } /// A macro for defining #[cfg] if-else statements. |
