mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
Fix outdated comment about not needing to flush stderr.
This commit is contained in:
parent
5e6e1e33a1
commit
2bc5d44ca9
@ -756,13 +756,9 @@ pub struct StderrLock<'a> {
|
|||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub fn stderr() -> Stderr {
|
pub fn stderr() -> Stderr {
|
||||||
// Note that unlike `stdout()` we don't use `Lazy` here which registers a
|
// Note that unlike `stdout()` we don't use `at_exit` here to register a
|
||||||
// destructor. Stderr is not buffered nor does the `stderr_raw` type consume
|
// destructor. Stderr is not buffered , so there's no need to run a
|
||||||
// any owned resources, so there's no need to run any destructors at some
|
// destructor for flushing the buffer
|
||||||
// point in the future.
|
|
||||||
//
|
|
||||||
// This has the added benefit of allowing `stderr` to be usable during
|
|
||||||
// process shutdown as well!
|
|
||||||
static INSTANCE: SyncOnceCell<ReentrantMutex<RefCell<StderrRaw>>> = SyncOnceCell::new();
|
static INSTANCE: SyncOnceCell<ReentrantMutex<RefCell<StderrRaw>>> = SyncOnceCell::new();
|
||||||
|
|
||||||
Stderr {
|
Stderr {
|
||||||
|
Loading…
Reference in New Issue
Block a user