1
Fork 0

std: update abort message in thread::set_current

This commit is contained in:
joboet 2024-04-08 12:17:19 +02:00
parent 061d8731fb
commit 37c1758214
No known key found for this signature in database
GPG key ID: 704E0149B0194B3C

View file

@ -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"),
});
}