diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2015-02-18 23:50:21 +1100 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2015-02-18 23:50:21 +1100 |
| commit | dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5 (patch) | |
| tree | e9c32f2e58b3462a23dd9c472d2f236640b78811 /src/libstd/macros.rs | |
| parent | 6c065fc8cb036785f61ff03e05c1563cbb2dd081 (diff) | |
| parent | 47f91a9484eceef10536d4caac6ef578cd254567 (diff) | |
| download | rust-dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5.tar.gz rust-dfc5c0f1e8799f47f9033bdcc8a7cd8a217620a5.zip | |
Manual merge of #22475 - alexcrichton:rollup, r=alexcrichton
One windows bot failed spuriously.
Diffstat (limited to 'src/libstd/macros.rs')
| -rw-r--r-- | src/libstd/macros.rs | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 6a2aafcf8f3..00bb7f86b17 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -60,23 +60,6 @@ macro_rules! panic { }); } -/// Use the syntax described in `std::fmt` to create a value of type `String`. -/// See `std::fmt` for more information. -/// -/// # Example -/// -/// ``` -/// format!("test"); -/// format!("hello {}", "world!"); -/// format!("x = {}, y = {y}", 10, y = 30); -/// ``` -#[cfg(stage0)] // NOTE: remove after snapshot -#[macro_export] -#[stable(feature = "rust1", since = "1.0.0")] -macro_rules! format { - ($($arg:tt)*) => ($crate::fmt::format(format_args!($($arg)*))) -} - /// Equivalent to the `println!` macro except that a newline is not printed at /// the end of the message. #[macro_export] @@ -126,7 +109,7 @@ macro_rules! try { /// # Examples /// /// ``` -/// use std::thread::Thread; +/// use std::thread; /// use std::sync::mpsc; /// /// // two placeholder functions for now @@ -136,8 +119,8 @@ macro_rules! try { /// let (tx1, rx1) = mpsc::channel(); /// let (tx2, rx2) = mpsc::channel(); /// -/// Thread::spawn(move|| { long_running_task(); tx1.send(()).unwrap(); }); -/// Thread::spawn(move|| { tx2.send(calculate_the_answer()).unwrap(); }); +/// thread::spawn(move|| { long_running_task(); tx1.send(()).unwrap(); }); +/// thread::spawn(move|| { tx2.send(calculate_the_answer()).unwrap(); }); /// /// select! ( /// _ = rx1.recv() => println!("the long running task finished first"), |
