diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2022-09-01 11:20:08 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2022-09-01 11:20:08 +0200 |
| commit | a20318d94ba68151a97d585b870915d3e2f9da58 (patch) | |
| tree | db2d6f75bba9262195fac4f35034937268f22c7d /library/std/src | |
| parent | b32223fec10743af93913c41ec60645d741b0cb6 (diff) | |
| download | rust-a20318d94ba68151a97d585b870915d3e2f9da58.tar.gz rust-a20318d94ba68151a97d585b870915d3e2f9da58.zip | |
Update outdated comment about output capturing in print_to.
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/io/stdio.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs index 4d3736f7914..07239746258 100644 --- a/library/std/src/io/stdio.rs +++ b/library/std/src/io/stdio.rs @@ -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) |
