diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-06-06 09:22:19 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-06 19:51:52 -0700 |
| commit | cb12e7ab743e4a0118a3de53a437a70cf332e5b1 (patch) | |
| tree | a7ecad3e47b1d697a36308ef901ed6bfbb6f7059 /src/libstd | |
| parent | 1f4d8f924e78408bc4b10a29da9c42ce29bd725c (diff) | |
| download | rust-cb12e7ab743e4a0118a3de53a437a70cf332e5b1.tar.gz rust-cb12e7ab743e4a0118a3de53a437a70cf332e5b1.zip | |
mk: Run doc tests with --cfg dox
There were a few examples in the macros::builtin module that weren't being run because they were being #[cfg]'d out. Closes #14697
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/macros.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index b555c966d2d..805da8021ed 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -465,7 +465,7 @@ pub mod builtin { /// ``` /// let rust = bytes!("r", 'u', "st", 255); /// assert_eq!(rust[1], 'u' as u8); - /// assert_eq!(rust[5], 255); + /// assert_eq!(rust[4], 255); /// ``` #[macro_export] macro_rules! bytes( ($($e:expr),*) => ({ /* compiler built-in */ }) ) @@ -482,10 +482,14 @@ pub mod builtin { /// # Example /// /// ``` + /// #![feature(concat_idents)] + /// + /// # fn main() { /// fn foobar() -> int { 23 } /// /// let f = concat_idents!(foo, bar); /// println!("{}", f()); + /// # } /// ``` #[macro_export] macro_rules! concat_idents( ($($e:ident),*) => ({ /* compiler built-in */ }) ) |
