Skip to content

Commit f00400c

Browse files
committed
---
yaml --- r: 232804 b: refs/heads/try c: 0e8538d h: refs/heads/master v: v3
1 parent ba3ec82 commit f00400c

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 1c447223750f415e3624dad1f742a78376be6287
4+
refs/heads/try: 0e8538d4772e1eda7e15eefe6e0057d0665a5e7d
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/libstd/macros.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,26 @@ macro_rules! panic {
6767
/// Note that stdout is frequently line-buffered by default so it may be
6868
/// necessary to use `io::stdout().flush()` to ensure the output is emitted
6969
/// immediately.
70+
///
71+
/// # Examples
72+
///
73+
/// ```
74+
/// use std::io::{self, Write};
75+
///
76+
/// print!("this ");
77+
/// print!("will ");
78+
/// print!("be ");
79+
/// print!("on ");
80+
/// print!("the ");
81+
/// print!("same ");
82+
/// print!("line ");
83+
///
84+
/// io::stdout().flush().unwrap();
85+
///
86+
/// print!("this string has a newline, why not choose println! instead?\n");
87+
///
88+
/// io::stdout().flush().unwrap();
89+
/// ```
7090
#[macro_export]
7191
#[stable(feature = "rust1", since = "1.0.0")]
7292
#[allow_internal_unstable]

0 commit comments

Comments
 (0)