diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-05-23 20:30:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-23 20:30:11 +0200 |
| commit | be2705caf26f154099eb75a9d91b88720122bcec (patch) | |
| tree | 1530a848b5e04986e0cb27e15aab359ace0ae741 | |
| parent | 8b69895ec2ee4b85ef5311468accf12f4460ec12 (diff) | |
| parent | d6dc08c3f4c32744c7163561da1a16825d1eed2d (diff) | |
| download | rust-be2705caf26f154099eb75a9d91b88720122bcec.tar.gz rust-be2705caf26f154099eb75a9d91b88720122bcec.zip | |
Rollup merge of #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.
| -rw-r--r-- | library/std/src/sync/mpmc/list.rs | 2 | ||||
| -rw-r--r-- | library/std/src/sys/thread_local/guard/key.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sync/mpmc/list.rs b/library/std/src/sync/mpmc/list.rs index 3fcfb85cf2a..050f26b097a 100644 --- a/library/std/src/sync/mpmc/list.rs +++ b/library/std/src/sync/mpmc/list.rs @@ -575,7 +575,7 @@ impl<T> Channel<T> { // After this point `head.block` is not modified again and it will be deallocated if it's // non-null. The `Drop` code of the channel, which runs after this function, also attempts // to deallocate `head.block` if it's non-null. Therefore this function must maintain the - // invariant that if a deallocation of head.block is attemped then it must also be set to + // invariant that if a deallocation of head.block is attempted then it must also be set to // NULL. Failing to do so will lead to the Drop code attempting a double free. For this // reason both reads above do an atomic swap instead of a simple atomic load. diff --git a/library/std/src/sys/thread_local/guard/key.rs b/library/std/src/sys/thread_local/guard/key.rs index 59581e6f281..f91471419c1 100644 --- a/library/std/src/sys/thread_local/guard/key.rs +++ b/library/std/src/sys/thread_local/guard/key.rs @@ -32,7 +32,7 @@ pub fn enable() { /// On platforms with key-based TLS, the system runs the destructors for us. /// We still have to make sure that [`crate::rt::thread_cleanup`] is called, -/// however. This is done by defering the execution of a TLS destructor to +/// however. This is done by deferring the execution of a TLS destructor to /// the next round of destruction inside the TLS destructors. #[cfg(not(target_thread_local))] pub fn enable() { @@ -46,7 +46,7 @@ pub fn enable() { unsafe extern "C" fn run(state: *mut u8) { if state == DEFER { // Make sure that this function is run again in the next round of - // TLS destruction. If there is no futher round, there will be leaks, + // TLS destruction. If there is no further round, there will be leaks, // but that's okay, `thread_cleanup` is not guaranteed to be called. unsafe { set(CLEANUP.force(), RUN) } } else { |
