From 628be3dae2884514df737dc8e0800a13eb4d722f Mon Sep 17 00:00:00 2001 From: ranger-ross Date: Sat, 31 Aug 2024 14:41:01 +0900 Subject: [PATCH] Fixed some typos in the standard library documentation/comments --- std/build.rs | 2 +- std/src/io/tests.rs | 2 +- std/src/rt.rs | 2 +- std/src/sync/mpmc/list.rs | 2 +- std/src/sys/pal/uefi/process.rs | 2 +- std/src/sys/pal/unix/net.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/std/build.rs b/std/build.rs index fecdf2c3e1f43..72254cafc850d 100644 --- a/std/build.rs +++ b/std/build.rs @@ -142,7 +142,7 @@ fn main() { // Configure platforms that have reliable basics but may have unreliable math. - // LLVM is currenlty adding missing routines, + // LLVM is currently adding missing routines, let has_reliable_f16_math = has_reliable_f16 && match (target_arch.as_str(), target_os.as_str()) { // FIXME: Disabled on Miri as the intrinsics are not implemented yet. diff --git a/std/src/io/tests.rs b/std/src/io/tests.rs index bb6a53bb290f9..24e5a1dfd5c00 100644 --- a/std/src/io/tests.rs +++ b/std/src/io/tests.rs @@ -738,7 +738,7 @@ fn read_buf_full_read() { #[test] // Miri does not support signalling OOM #[cfg_attr(miri, ignore)] -// 64-bit only to be sure the allocator will fail fast on an impossible to satsify size +// 64-bit only to be sure the allocator will fail fast on an impossible to satisfy size #[cfg(target_pointer_width = "64")] fn try_oom_error() { let mut v = Vec::::new(); diff --git a/std/src/rt.rs b/std/src/rt.rs index 307a543c9d215..b6f36931ec28a 100644 --- a/std/src/rt.rs +++ b/std/src/rt.rs @@ -146,7 +146,7 @@ fn lang_start_internal( rtabort!("drop of the panic payload panicked"); }); panic::catch_unwind(cleanup).map_err(rt_abort)?; - // Guard against multple threads calling `libc::exit` concurrently. + // Guard against multiple threads calling `libc::exit` concurrently. // See the documentation for `unique_thread_exit` for more information. panic::catch_unwind(|| crate::sys::exit_guard::unique_thread_exit()).map_err(rt_abort)?; ret_code diff --git a/std/src/sync/mpmc/list.rs b/std/src/sync/mpmc/list.rs index bbe205cad04e6..88a8c75f7c8b9 100644 --- a/std/src/sync/mpmc/list.rs +++ b/std/src/sync/mpmc/list.rs @@ -551,7 +551,7 @@ impl Channel { let mut head = self.head.index.load(Ordering::Acquire); // The channel may be uninitialized, so we have to swap to avoid overwriting any sender's attempts - // to initalize the first block before noticing that the receivers disconnected. Late allocations + // to initialize the first block before noticing that the receivers disconnected. Late allocations // will be deallocated by the sender in Drop. let mut block = self.head.block.swap(ptr::null_mut(), Ordering::AcqRel); diff --git a/std/src/sys/pal/uefi/process.rs b/std/src/sys/pal/uefi/process.rs index fdc5f5d7e4fea..0cc9cecb89db0 100644 --- a/std/src/sys/pal/uefi/process.rs +++ b/std/src/sys/pal/uefi/process.rs @@ -470,7 +470,7 @@ mod uefi_command_internal { let st_size = unsafe { (*self.st.as_ptr()).hdr.header_size as usize }; let mut crc32: u32 = 0; - // Set crc to 0 before calcuation + // Set crc to 0 before calculation unsafe { (*self.st.as_mut_ptr()).hdr.crc32 = 0; } diff --git a/std/src/sys/pal/unix/net.rs b/std/src/sys/pal/unix/net.rs index bc0e3f4eeeac8..d75a666d350ff 100644 --- a/std/src/sys/pal/unix/net.rs +++ b/std/src/sys/pal/unix/net.rs @@ -215,7 +215,7 @@ impl Socket { _ => { if cfg!(target_os = "vxworks") { // VxWorks poll does not return POLLHUP or POLLERR in revents. Check if the - // connnection actually succeeded and return ok only when the socket is + // connection actually succeeded and return ok only when the socket is // ready and no errors were found. if let Some(e) = self.take_error()? { return Err(e);