Skip to content

Commit d0b9882

Browse files
authored
Rollup merge of rust-lang#141398 - Dannyyy93:typos, r=Noratrieb
chore: fix typos in comment ## Fix Typos in Comments This PR addresses several typos in the Rust standard library's documentation comments: - In `library/std/src/sync/mpmc/list.rs`: Corrected "attemped" to "attempted" - In `library/std/src/sys/thread_local/guard/key.rs`: Fixed "defering" to "deferring" - In `library/std/src/sys/thread_local/guard/key.rs`: Fixed "futher" to "further" These changes improve documentation readability and consistency without affecting any functional code.
2 parents 3308e19 + 0dd69e0 commit d0b9882

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

std/src/sync/mpmc/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ impl<T> Channel<T> {
575575
// After this point `head.block` is not modified again and it will be deallocated if it's
576576
// non-null. The `Drop` code of the channel, which runs after this function, also attempts
577577
// to deallocate `head.block` if it's non-null. Therefore this function must maintain the
578-
// invariant that if a deallocation of head.block is attemped then it must also be set to
578+
// invariant that if a deallocation of head.block is attempted then it must also be set to
579579
// NULL. Failing to do so will lead to the Drop code attempting a double free. For this
580580
// reason both reads above do an atomic swap instead of a simple atomic load.
581581

std/src/sys/thread_local/guard/key.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn enable() {
3232

3333
/// On platforms with key-based TLS, the system runs the destructors for us.
3434
/// We still have to make sure that [`crate::rt::thread_cleanup`] is called,
35-
/// however. This is done by defering the execution of a TLS destructor to
35+
/// however. This is done by deferring the execution of a TLS destructor to
3636
/// the next round of destruction inside the TLS destructors.
3737
#[cfg(not(target_thread_local))]
3838
pub fn enable() {
@@ -46,7 +46,7 @@ pub fn enable() {
4646
unsafe extern "C" fn run(state: *mut u8) {
4747
if state == DEFER {
4848
// Make sure that this function is run again in the next round of
49-
// TLS destruction. If there is no futher round, there will be leaks,
49+
// TLS destruction. If there is no further round, there will be leaks,
5050
// but that's okay, `thread_cleanup` is not guaranteed to be called.
5151
unsafe { set(CLEANUP.force(), RUN) }
5252
} else {

0 commit comments

Comments
 (0)