about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-07-15 10:56:42 +0200
committerGitHub <noreply@github.com>2016-07-15 10:56:42 +0200
commitd607e284c820bb9c2db7d11c6fa65a4138b4afb0 (patch)
treec231f357d3407c41192e4ce7820abc1f0ccfbfe8 /src/libstd
parent257b351ad17564d6691342d6db22c46392bfad8b (diff)
parent4bfaa43eed7ea88fa581c875f5d1c1c801d64e5f (diff)
downloadrust-d607e284c820bb9c2db7d11c6fa65a4138b4afb0.tar.gz
rust-d607e284c820bb9c2db7d11c6fa65a4138b4afb0.zip
Rollup merge of #34777 - glandium:issue34697, r=GuillaumeGomez
doc: Mention that writeln! and println! always use LF

Fixes #34697

I'm not really satisfied with the wording, but I didn't have a better idea. Suggestions welcome.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/macros.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 26cf8a3199d..6f0f6ecab5b 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -98,7 +98,9 @@ macro_rules! print {
     ($($arg:tt)*) => ($crate::io::_print(format_args!($($arg)*)));
 }
 
-/// Macro for printing to the standard output, with a newline.
+/// Macro for printing to the standard output, with a newline. On all
+/// platforms, the newline is the LINE FEED character (`\n`/`U+000A`) alone
+/// (no additional CARRIAGE RETURN (`\r`/`U+000D`).
 ///
 /// Use the `format!` syntax to write data to the standard output.
 /// See `std::fmt` for more information.