about summary refs log tree commit diff
path: root/library/std/src/thread
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-11-25 18:29:36 +0100
committerRalf Jung <post@ralfj.de>2024-11-25 18:31:49 +0100
commit8bc8adb8dcaa268e2b2bd9093f8f4f4bcb0b1a45 (patch)
tree6ba2b629b0f8d7cbf8ea8670fe2699c1a8dbc351 /library/std/src/thread
parent7db7489f9bc274cb60c4956bfa56de0185eb1b9b (diff)
downloadrust-8bc8adb8dcaa268e2b2bd9093f8f4f4bcb0b1a45.tar.gz
rust-8bc8adb8dcaa268e2b2bd9093f8f4f4bcb0b1a45.zip
std::thread: avoid leading whitespace in some panic messages
Diffstat (limited to 'library/std/src/thread')
-rw-r--r--library/std/src/thread/current.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/std/src/thread/current.rs b/library/std/src/thread/current.rs
index b9b959f9894..1048ef97356 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"
         )
     }
 }