Skip to content

Commit 6e8693b

Browse files
committed
std: Add a note about the print! macro and output buffering
1 parent 01f2c67 commit 6e8693b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd/macros.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ macro_rules! panic {
6464
///
6565
/// Equivalent to the `println!` macro except that a newline is not printed at
6666
/// the end of the message.
67+
///
68+
/// Note that stdout is frequently line-buffered by default so it may be
69+
/// necessary to use `io::stdout().flush()` to ensure the output is emitted
70+
/// immediately.
6771
#[macro_export]
6872
#[stable(feature = "rust1", since = "1.0.0")]
6973
#[allow_internal_unstable]

0 commit comments

Comments
 (0)