about summary refs log tree commit diff
path: root/library/std/src/thread
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2024-04-08 12:17:19 +0200
committerjoboet <jonasboettiger@icloud.com>2024-04-08 12:17:19 +0200
commit37c1758214bfa52d791d43ff73e07573e5db653d (patch)
tree1a968a16f15e980e85eb002d9e0fbea6a8c91c44 /library/std/src/thread
parent061d8731fb0ab1d57d7a289fd0ded173ceef8a64 (diff)
downloadrust-37c1758214bfa52d791d43ff73e07573e5db653d.tar.gz
rust-37c1758214bfa52d791d43ff73e07573e5db653d.zip
std: update abort message in `thread::set_current`
Diffstat (limited to 'library/std/src/thread')
-rw-r--r--library/std/src/thread/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index ae3dfef4870..9cdc20b1f28 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -690,7 +690,7 @@ pub(crate) fn set_current(thread: Thread) {
     // control over where this is called, so just abort if there is a bug.
     CURRENT.with(|current| match current.set(thread) {
         Ok(()) => {}
-        Err(_) => rtabort!("should only be set once"),
+        Err(_) => rtabort!("thread::set_current should only be called once per thread"),
     });
 }