about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-03-16 13:19:52 +0800
committerGitHub <noreply@github.com>2025-03-16 13:19:52 +0800
commit26dea1d94426bc85d1ae03e66870276c7e4c16f0 (patch)
treebb67bf2d508a562e4641068d18bf485845a593e7
parenta23a93cb4e848c75d6cf2ddb9ca418a0e501af90 (diff)
parent74ec86248a442b64bae3f83443ac72bb5be3d160 (diff)
downloadrust-26dea1d94426bc85d1ae03e66870276c7e4c16f0.tar.gz
rust-26dea1d94426bc85d1ae03e66870276c7e4c16f0.zip
Rollup merge of #137492 - nabijaczleweli:master, r=thomcc
libstd: rustdoc: correct note on fds 0/1/2 pre-main

Closes: #137490
-rw-r--r--library/std/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
index 35ada678740..ad005833ad5 100644
--- a/library/std/src/lib.rs
+++ b/library/std/src/lib.rs
@@ -174,7 +174,9 @@
 //!
 //! - after-main use of thread-locals, which also affects additional features:
 //!   - [`thread::current()`]
-//! - before-main stdio file descriptors are not guaranteed to be open on unix platforms
+//! - under UNIX, before main, file descriptors 0, 1, and 2 may be unchanged
+//!   (they are guaranteed to be open during main,
+//!    and are opened to /dev/null O_RDWR if they weren't open on program start)
 //!
 //!
 //! [I/O]: io