Skip to content

Commit 2d65bac

Browse files
RalfJunggitbot
authored and
gitbot
committed
std::thread: avoid leading whitespace in some panic messages
1 parent 83bcf60 commit 2d65bac

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

std/src/thread/current.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -243,17 +243,17 @@ fn init_current(current: *mut ()) -> Thread {
243243
// a particular API should be entirely allocation-free, feel free to open
244244
// an issue on the Rust repository, we'll see what we can do.
245245
rtabort!(
246-
"\n
247-
Attempted to access thread-local data while allocating said data.\n
248-
Do not access functions that allocate in the global allocator!\n
249-
This is a bug in the global allocator.\n
250-
"
246+
"\n\
247+
Attempted to access thread-local data while allocating said data.\n\
248+
Do not access functions that allocate in the global allocator!\n\
249+
This is a bug in the global allocator.\n\
250+
"
251251
)
252252
} else {
253253
debug_assert_eq!(current, DESTROYED);
254254
panic!(
255-
"use of std::thread::current() is not possible after the thread's
256-
local data has been destroyed"
255+
"use of std::thread::current() is not possible after the thread's \
256+
local data has been destroyed"
257257
)
258258
}
259259
}

0 commit comments

Comments
 (0)