about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKornel <kornel@geekhood.net>2025-02-17 17:04:36 +0000
committerKornel <kornel@geekhood.net>2025-02-21 13:09:16 +0000
commit4742dbc765165dc0ece5e350b3527e697ff871dc (patch)
tree2bf1d911065f1989237ee1351097264f40c50110
parentad566646cf02163373c5d60033be07c2d903ef90 (diff)
downloadrust-4742dbc765165dc0ece5e350b3527e697ff871dc.tar.gz
rust-4742dbc765165dc0ece5e350b3527e697ff871dc.zip
Use faster thread_local! for stdout
-rw-r--r--library/std/src/io/stdio.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs
index 661c422811a..017862c7f3a 100644
--- a/library/std/src/io/stdio.rs
+++ b/library/std/src/io/stdio.rs
@@ -20,7 +20,7 @@ type LocalStream = Arc<Mutex<Vec<u8>>>;
 
 thread_local! {
     /// Used by the test crate to capture the output of the print macros and panics.
-    static OUTPUT_CAPTURE: Cell<Option<LocalStream>> = {
+    static OUTPUT_CAPTURE: Cell<Option<LocalStream>> = const {
         Cell::new(None)
     }
 }