about summary refs log tree commit diff
path: root/library/std
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-04-26 18:51:41 +0200
committerGitHub <noreply@github.com>2023-04-26 18:51:41 +0200
commit9babe98562745dbdd6d7d376a004f91078cbe35e (patch)
tree0c1bcefc27f7a7a7c9701831684348e00cfd9c05 /library/std
parentea8bd06b56bd34098b315f811d911a1d4ad9cb5d (diff)
parent9a55e9edc57fa939185542be7e2d5b89418c78c9 (diff)
downloadrust-9babe98562745dbdd6d7d376a004f91078cbe35e.tar.gz
rust-9babe98562745dbdd6d7d376a004f91078cbe35e.zip
Rollup merge of #110419 - jsoref:spelling-library, r=jyn514
Spelling library

Split per https://github.com/rust-lang/rust/pull/110392

I can squash once people are happy w/ the changes. It's really uncommon for large sets of changes to be perfectly acceptable w/o at least some changes.

I probably won't have time to respond until tomorrow or the next day
Diffstat (limited to 'library/std')
-rw-r--r--library/std/src/io/buffered/tests.rs13
-rw-r--r--library/std/src/io/readbuf/tests.rs2
-rw-r--r--library/std/src/keyword_docs.rs4
-rw-r--r--library/std/src/os/windows/io/handle.rs2
-rw-r--r--library/std/src/os/windows/io/socket.rs2
-rw-r--r--library/std/src/sync/once_lock/tests.rs2
-rw-r--r--library/std/src/sync/remutex.rs2
-rw-r--r--library/std/src/sys/sgx/abi/entry.S4
-rw-r--r--library/std/src/sys/unix/process/process_unix.rs2
-rw-r--r--library/std/src/sys/unix/process/process_vxworks.rs2
-rw-r--r--library/std/src/thread/mod.rs4
11 files changed, 20 insertions, 19 deletions
diff --git a/library/std/src/io/buffered/tests.rs b/library/std/src/io/buffered/tests.rs
index 4c1b7d57684..35a5291a347 100644
--- a/library/std/src/io/buffered/tests.rs
+++ b/library/std/src/io/buffered/tests.rs
@@ -831,9 +831,9 @@ fn partial_line_buffered_after_line_write() {
     assert_eq!(&writer.get_ref().buffer, b"Line 1\nLine 2\nLine 3");
 }
 
-/// Test that, given a partial line that exceeds the length of
-/// LineBuffer's buffer (that is, without a trailing newline), that that
-/// line is written to the inner writer
+/// Test that for calls to LineBuffer::write where the passed bytes do not contain
+/// a newline and on their own are greater in length than the internal buffer, the
+/// passed bytes are immediately written to the inner writer.
 #[test]
 fn long_line_flushed() {
     let writer = ProgrammableSink::default();
@@ -844,9 +844,10 @@ fn long_line_flushed() {
 }
 
 /// Test that, given a very long partial line *after* successfully
-/// flushing a complete line, that that line is buffered unconditionally,
-/// and no additional writes take place. This assures the property that
-/// `write` should make at-most-one attempt to write new data.
+/// flushing a complete line, the very long partial line is buffered
+/// unconditionally, and no additional writes take place. This assures
+/// the property that `write` should make at-most-one attempt to write
+/// new data.
 #[test]
 fn line_long_tail_not_flushed() {
     let writer = ProgrammableSink::default();
diff --git a/library/std/src/io/readbuf/tests.rs b/library/std/src/io/readbuf/tests.rs
index cc1b423f2dd..89a2f6b2271 100644
--- a/library/std/src/io/readbuf/tests.rs
+++ b/library/std/src/io/readbuf/tests.rs
@@ -36,7 +36,7 @@ fn initialize_unfilled() {
 }
 
 #[test]
-fn addvance_filled() {
+fn advance_filled() {
     let buf: &mut [_] = &mut [0; 16];
     let mut rbuf: BorrowedBuf<'_> = buf.into();
 
diff --git a/library/std/src/keyword_docs.rs b/library/std/src/keyword_docs.rs
index 43842bee992..be6dc7768af 100644
--- a/library/std/src/keyword_docs.rs
+++ b/library/std/src/keyword_docs.rs
@@ -1925,7 +1925,7 @@ mod type_keyword {}
 /// `unsafe_op_in_unsafe_fn` lint can be enabled to warn against that and require explicit unsafe
 /// blocks even inside `unsafe fn`.
 ///
-/// See the [Rustnomicon] and the [Reference] for more information.
+/// See the [Rustonomicon] and the [Reference] for more information.
 ///
 /// # Examples
 ///
@@ -2129,7 +2129,7 @@ mod type_keyword {}
 /// [`impl`]: keyword.impl.html
 /// [raw pointers]: ../reference/types/pointer.html
 /// [memory safety]: ../book/ch19-01-unsafe-rust.html
-/// [Rustnomicon]: ../nomicon/index.html
+/// [Rustonomicon]: ../nomicon/index.html
 /// [nomicon-soundness]: ../nomicon/safe-unsafe-meaning.html
 /// [soundness]: https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#soundness-of-code--of-a-library
 /// [Reference]: ../reference/unsafety.html
diff --git a/library/std/src/os/windows/io/handle.rs b/library/std/src/os/windows/io/handle.rs
index f6622874625..11948cecad8 100644
--- a/library/std/src/os/windows/io/handle.rs
+++ b/library/std/src/os/windows/io/handle.rs
@@ -450,7 +450,7 @@ impl AsHandle for OwnedHandle {
     #[inline]
     fn as_handle(&self) -> BorrowedHandle<'_> {
         // Safety: `OwnedHandle` and `BorrowedHandle` have the same validity
-        // invariants, and the `BorrowdHandle` is bounded by the lifetime
+        // invariants, and the `BorrowedHandle` is bounded by the lifetime
         // of `&self`.
         unsafe { BorrowedHandle::borrow_raw(self.as_raw_handle()) }
     }
diff --git a/library/std/src/os/windows/io/socket.rs b/library/std/src/os/windows/io/socket.rs
index 5c1634084a0..b6bd0f9e12b 100644
--- a/library/std/src/os/windows/io/socket.rs
+++ b/library/std/src/os/windows/io/socket.rs
@@ -260,7 +260,7 @@ impl AsSocket for OwnedSocket {
     #[inline]
     fn as_socket(&self) -> BorrowedSocket<'_> {
         // Safety: `OwnedSocket` and `BorrowedSocket` have the same validity
-        // invariants, and the `BorrowdSocket` is bounded by the lifetime
+        // invariants, and the `BorrowedSocket` is bounded by the lifetime
         // of `&self`.
         unsafe { BorrowedSocket::borrow_raw(self.as_raw_socket()) }
     }
diff --git a/library/std/src/sync/once_lock/tests.rs b/library/std/src/sync/once_lock/tests.rs
index 46695225b9f..d5d32e73d88 100644
--- a/library/std/src/sync/once_lock/tests.rs
+++ b/library/std/src/sync/once_lock/tests.rs
@@ -24,7 +24,7 @@ fn sync_once_cell() {
         assert_eq!(ONCE_CELL.get(), Some(&92));
     });
 
-    ONCE_CELL.get_or_init(|| panic!("Kabom!"));
+    ONCE_CELL.get_or_init(|| panic!("Kaboom!"));
     assert_eq!(ONCE_CELL.get(), Some(&92));
 }
 
diff --git a/library/std/src/sync/remutex.rs b/library/std/src/sync/remutex.rs
index 519ec2c32bd..0ced48d10b7 100644
--- a/library/std/src/sync/remutex.rs
+++ b/library/std/src/sync/remutex.rs
@@ -7,7 +7,7 @@ use crate::panic::{RefUnwindSafe, UnwindSafe};
 use crate::sync::atomic::{AtomicUsize, Ordering::Relaxed};
 use crate::sys::locks as sys;
 
-/// A re-entrant mutual exclusion
+/// A reentrant mutual exclusion
 ///
 /// This mutex will block *other* threads waiting for the lock to become
 /// available. The thread which has already locked the mutex can lock it
diff --git a/library/std/src/sys/sgx/abi/entry.S b/library/std/src/sys/sgx/abi/entry.S
index f61bcf06f08..ca79d1d796e 100644
--- a/library/std/src/sys/sgx/abi/entry.S
+++ b/library/std/src/sys/sgx/abi/entry.S
@@ -58,7 +58,7 @@ IMAGE_BASE:
     globvar DEBUG 1
     /*  The base address (relative to enclave start) of the enclave text section */
     globvar TEXT_BASE 8
-    /*  The size in bytes of enclacve text section */
+    /*  The size in bytes of enclave text section */
     globvar TEXT_SIZE 8
     /*  The base address (relative to enclave start) of the enclave .eh_frame_hdr section */
     globvar EH_FRM_HDR_OFFSET 8
@@ -66,7 +66,7 @@ IMAGE_BASE:
     globvar EH_FRM_HDR_LEN 8
     /*  The base address (relative to enclave start) of the enclave .eh_frame section */
     globvar EH_FRM_OFFSET 8
-    /*  The size in bytes of enclacve .eh_frame section */
+    /*  The size in bytes of enclave .eh_frame section */
     globvar EH_FRM_LEN 8
 
 .org .Lxsave_clear+512
diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs
index ceaff596684..612d43fe204 100644
--- a/library/std/src/sys/unix/process/process_unix.rs
+++ b/library/std/src/sys/unix/process/process_unix.rs
@@ -735,7 +735,7 @@ impl ExitStatus {
         // true on all actual versions of Unix, is widely assumed, and is specified in SuS
         // https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not
         // true for a platform pretending to be Unix, the tests (our doctests, and also
-        // procsss_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
+        // process_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
         match NonZero_c_int::try_from(self.0) {
             /* was nonzero */ Ok(failure) => Err(ExitStatusError(failure)),
             /* was zero, couldn't convert */ Err(_) => Ok(()),
diff --git a/library/std/src/sys/unix/process/process_vxworks.rs b/library/std/src/sys/unix/process/process_vxworks.rs
index 569a4b14912..c40e7ada03c 100644
--- a/library/std/src/sys/unix/process/process_vxworks.rs
+++ b/library/std/src/sys/unix/process/process_vxworks.rs
@@ -199,7 +199,7 @@ impl ExitStatus {
         // true on all actual versions of Unix, is widely assumed, and is specified in SuS
         // https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not
         // true for a platform pretending to be Unix, the tests (our doctests, and also
-        // procsss_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
+        // process_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
         match NonZero_c_int::try_from(self.0) {
             Ok(failure) => Err(ExitStatusError(failure)),
             Err(_) => Ok(()),
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index 13b845b25c9..40e8e5a629e 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -494,7 +494,7 @@ impl Builder {
                 MaybeDangling(mem::MaybeUninit::new(x))
             }
             fn into_inner(self) -> T {
-                // SAFETY: we are always initiailized.
+                // SAFETY: we are always initialized.
                 let ret = unsafe { self.0.assume_init_read() };
                 // Make sure we don't drop.
                 mem::forget(self);
@@ -503,7 +503,7 @@ impl Builder {
         }
         impl<T> Drop for MaybeDangling<T> {
             fn drop(&mut self) {
-                // SAFETY: we are always initiailized.
+                // SAFETY: we are always initialized.
                 unsafe { self.0.assume_init_drop() };
             }
         }