Skip to content

Commit

Permalink
Rollup merge of rust-lang#101270 - m-ou-se:update-comment, r=joshtrip…
Browse files Browse the repository at this point in the history
…lett

Update outdated comment about output capturing in print_to.
  • Loading branch information
matthiaskrgr authored Sep 1, 2022
2 parents 2dfa318 + a20318d commit e5f3d38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/std/src/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -986,10 +986,10 @@ pub fn set_output_capture(sink: Option<LocalStream>) -> Option<LocalStream> {
/// otherwise. `label` identifies the stream in a panic message.
///
/// This function is used to print error messages, so it takes extra
/// care to avoid causing a panic when `local_s` is unusable.
/// For instance, if the TLS key for the local stream is
/// already destroyed, or if the local stream is locked by another
/// thread, it will just fall back to the global stream.
/// care to avoid causing a panic when `OUTPUT_CAPTURE` is unusable.
/// For instance, if the TLS key for output capturing is already destroyed, or
/// if the local stream is in use by another thread, it will just fall back to
/// the global stream.
///
/// However, if the actual I/O causes an error, this function does panic.
fn print_to<T>(args: fmt::Arguments<'_>, global_s: fn() -> T, label: &str)
Expand Down

0 comments on commit e5f3d38

Please sign in to comment.