summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-07 21:17:30 +0000
committerbors <bors@rust-lang.org>2022-09-07 21:17:30 +0000
commitc2804e6ec2c29a5c7368600ea173b890e2655c3d (patch)
tree466a4e69430b3932571c803fe46577f55d94546b /library/std/src
parent9682b5d3a34b3167d7f2f2d0cf6ddc485cd51b4b (diff)
parenteae48c31cb79f74f68aab6e59e28be55a89092c3 (diff)
downloadrust-c2804e6ec2c29a5c7368600ea173b890e2655c3d.tar.gz
rust-c2804e6ec2c29a5c7368600ea173b890e2655c3d.zip
Auto merge of #101544 - matthiaskrgr:rollup-4urx917, r=matthiaskrgr
Rollup of 14 pull requests

Successful merges:

 - #101343 (Add -api-level to pm command)
 - #101416 (stdio: Document no support for writing to non-blocking stdio/stderr)
 - #101435 (Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH`)
 - #101493 (Pass ImplTraitContext as &mut to avoid the need of ImplTraitContext::reborrow)
 - #101502 (Do not suggest a semicolon for a macro without `!`)
 - #101503 (Add debug calls)
 - #101506 (rustdoc: remove unused CSS `#main-content > .since`)
 - #101507 (rustdoc: remove unused CSS `#main-content > table td`)
 - #101521 (Rustdoc-Json: More accurate struct type.)
 - #101525 (Fix typo in pass_manager.rs)
 - #101534 (rustdoc: remove unused mobile CSS `.rustdoc { flex-direction }`)
 - #101535 (Fix error printing mistake in tidy)
 - #101536 (Add documentation for Attr::is_doc_comment)
 - #101538 (rustdoc: remove unused CSS `.content .methods > div`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/io/stdio.rs3
-rw-r--r--library/std/src/macros.rs12
2 files changed, 15 insertions, 0 deletions
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs
index 91cff3217d2..2dc12a18a8a 100644
--- a/library/std/src/io/stdio.rs
+++ b/library/std/src/io/stdio.rs
@@ -992,6 +992,9 @@ pub fn set_output_capture(sink: Option<LocalStream>) -> Option<LocalStream> {
 /// the global stream.
 ///
 /// However, if the actual I/O causes an error, this function does panic.
+///
+/// Writing to non-blocking stdout/stderr can cause an error, which will lead
+/// this function to panic.
 fn print_to<T>(args: fmt::Arguments<'_>, global_s: fn() -> T, label: &str)
 where
     T: Write,
diff --git a/library/std/src/macros.rs b/library/std/src/macros.rs
index a5003c66fca..6e4ba1404e5 100644
--- a/library/std/src/macros.rs
+++ b/library/std/src/macros.rs
@@ -49,6 +49,9 @@ macro_rules! panic {
 ///
 /// Panics if writing to `io::stdout()` fails.
 ///
+/// Writing to non-blocking stdout can cause an error, which will lead
+/// this macro to panic.
+///
 /// # Examples
 ///
 /// ```
@@ -107,6 +110,9 @@ macro_rules! print {
 ///
 /// Panics if writing to [`io::stdout`] fails.
 ///
+/// Writing to non-blocking stdout can cause an error, which will lead
+/// this macro to panic.
+///
 /// [`io::stdout`]: crate::io::stdout
 ///
 /// # Examples
@@ -147,6 +153,9 @@ macro_rules! println {
 ///
 /// Panics if writing to `io::stderr` fails.
 ///
+/// Writing to non-blocking stdout can cause an error, which will lead
+/// this macro to panic.
+///
 /// # Examples
 ///
 /// ```
@@ -179,6 +188,9 @@ macro_rules! eprint {
 ///
 /// Panics if writing to `io::stderr` fails.
 ///
+/// Writing to non-blocking stdout can cause an error, which will lead
+/// this macro to panic.
+///
 /// # Examples
 ///
 /// ```