Skip to content

Commit

Permalink
std: update abort message in thread::set_current
Browse files Browse the repository at this point in the history
  • Loading branch information
joboet committed Apr 8, 2024
1 parent 061d873 commit 37c1758
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
});
}

Expand Down

0 comments on commit 37c1758

Please sign in to comment.