From 8bc8adb8dcaa268e2b2bd9093f8f4f4bcb0b1a45 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 25 Nov 2024 18:29:36 +0100 Subject: [PATCH] std::thread: avoid leading whitespace in some panic messages --- library/std/src/thread/current.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/library/std/src/thread/current.rs b/library/std/src/thread/current.rs index b9b959f98946b..1048ef973560e 100644 --- a/library/std/src/thread/current.rs +++ b/library/std/src/thread/current.rs @@ -243,17 +243,17 @@ fn init_current(current: *mut ()) -> Thread { // a particular API should be entirely allocation-free, feel free to open // an issue on the Rust repository, we'll see what we can do. rtabort!( - "\n - Attempted to access thread-local data while allocating said data.\n - Do not access functions that allocate in the global allocator!\n - This is a bug in the global allocator.\n - " + "\n\ + Attempted to access thread-local data while allocating said data.\n\ + Do not access functions that allocate in the global allocator!\n\ + This is a bug in the global allocator.\n\ + " ) } else { debug_assert_eq!(current, DESTROYED); panic!( - "use of std::thread::current() is not possible after the thread's - local data has been destroyed" + "use of std::thread::current() is not possible after the thread's \ + local data has been destroyed" ) } }