summary refs log tree commit diff
path: root/library/alloc
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/alloc
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/alloc')
-rw-r--r--library/alloc/src/collections/vec_deque/spec_from_iter.rs2
-rw-r--r--library/alloc/src/str.rs6
-rw-r--r--library/alloc/src/vec/in_place_collect.rs2
-rw-r--r--library/alloc/tests/slice.rs42
-rw-r--r--library/alloc/tests/vec.rs2
5 files changed, 27 insertions, 27 deletions
diff --git a/library/alloc/src/collections/vec_deque/spec_from_iter.rs b/library/alloc/src/collections/vec_deque/spec_from_iter.rs
index 7650492ebda..2708c7fe102 100644
--- a/library/alloc/src/collections/vec_deque/spec_from_iter.rs
+++ b/library/alloc/src/collections/vec_deque/spec_from_iter.rs
@@ -12,7 +12,7 @@ where
     default fn spec_from_iter(iterator: I) -> Self {
         // Since converting is O(1) now, just re-use the `Vec` logic for
         // anything where we can't do something extra-special for `VecDeque`,
-        // especially as that could save us some monomorphiziation work
+        // especially as that could save us some monomorphization work
         // if one uses the same iterators (like slice ones) with both.
         crate::vec::Vec::from_iter(iterator).into()
     }
diff --git a/library/alloc/src/str.rs b/library/alloc/src/str.rs
index b87ef59f64a..84977409904 100644
--- a/library/alloc/src/str.rs
+++ b/library/alloc/src/str.rs
@@ -404,12 +404,12 @@ impl str {
             // See https://www.unicode.org/versions/Unicode7.0.0/ch03.pdf#G33992
             // for the definition of `Final_Sigma`.
             debug_assert!('Σ'.len_utf8() == 2);
-            let is_word_final = case_ignoreable_then_cased(from[..i].chars().rev())
-                && !case_ignoreable_then_cased(from[i + 2..].chars());
+            let is_word_final = case_ignorable_then_cased(from[..i].chars().rev())
+                && !case_ignorable_then_cased(from[i + 2..].chars());
             to.push_str(if is_word_final { "ς" } else { "σ" });
         }
 
-        fn case_ignoreable_then_cased<I: Iterator<Item = char>>(iter: I) -> bool {
+        fn case_ignorable_then_cased<I: Iterator<Item = char>>(iter: I) -> bool {
             use core::unicode::{Case_Ignorable, Cased};
             match iter.skip_while(|&c| Case_Ignorable(c)).next() {
                 Some(c) => Cased(c),
diff --git a/library/alloc/src/vec/in_place_collect.rs b/library/alloc/src/vec/in_place_collect.rs
index 87d61deb1eb..2f1ee8b0353 100644
--- a/library/alloc/src/vec/in_place_collect.rs
+++ b/library/alloc/src/vec/in_place_collect.rs
@@ -201,7 +201,7 @@ where
         //
         // Note: This access to the source wouldn't be allowed by the TrustedRandomIteratorNoCoerce
         // contract (used by SpecInPlaceCollect below). But see the "O(1) collect" section in the
-        // module documenttation why this is ok anyway.
+        // module documentation why this is ok anyway.
         let dst_guard = InPlaceDstBufDrop { ptr: dst_buf, len, cap };
         src.forget_allocation_drop_remaining();
         mem::forget(dst_guard);
diff --git a/library/alloc/tests/slice.rs b/library/alloc/tests/slice.rs
index 0693beb48c4..9aa5575ca93 100644
--- a/library/alloc/tests/slice.rs
+++ b/library/alloc/tests/slice.rs
@@ -705,7 +705,7 @@ fn test_move_rev_iterator() {
 }
 
 #[test]
-fn test_splitator() {
+fn test_split_iterator() {
     let xs = &[1, 2, 3, 4, 5];
 
     let splits: &[&[_]] = &[&[1], &[3], &[5]];
@@ -725,7 +725,7 @@ fn test_splitator() {
 }
 
 #[test]
-fn test_splitator_inclusive() {
+fn test_split_iterator_inclusive() {
     let xs = &[1, 2, 3, 4, 5];
 
     let splits: &[&[_]] = &[&[1, 2], &[3, 4], &[5]];
@@ -745,7 +745,7 @@ fn test_splitator_inclusive() {
 }
 
 #[test]
-fn test_splitator_inclusive_reverse() {
+fn test_split_iterator_inclusive_reverse() {
     let xs = &[1, 2, 3, 4, 5];
 
     let splits: &[&[_]] = &[&[5], &[3, 4], &[1, 2]];
@@ -765,7 +765,7 @@ fn test_splitator_inclusive_reverse() {
 }
 
 #[test]
-fn test_splitator_mut_inclusive() {
+fn test_split_iterator_mut_inclusive() {
     let xs = &mut [1, 2, 3, 4, 5];
 
     let splits: &[&[_]] = &[&[1, 2], &[3, 4], &[5]];
@@ -785,7 +785,7 @@ fn test_splitator_mut_inclusive() {
 }
 
 #[test]
-fn test_splitator_mut_inclusive_reverse() {
+fn test_split_iterator_mut_inclusive_reverse() {
     let xs = &mut [1, 2, 3, 4, 5];
 
     let splits: &[&[_]] = &[&[5], &[3, 4], &[1, 2]];
@@ -805,7 +805,7 @@ fn test_splitator_mut_inclusive_reverse() {
 }
 
 #[test]
-fn test_splitnator() {
+fn test_splitn_iterator() {
     let xs = &[1, 2, 3, 4, 5];
 
     let splits: &[&[_]] = &[&[1, 2, 3, 4, 5]];
@@ -821,7 +821,7 @@ fn test_splitnator() {
 }
 
 #[test]
-fn test_splitnator_mut() {
+fn test_splitn_iterator_mut() {
     let xs = &mut [1, 2, 3, 4, 5];
 
     let splits: &[&mut [_]] = &[&mut [1, 2, 3, 4, 5]];
@@ -837,7 +837,7 @@ fn test_splitnator_mut() {
 }
 
 #[test]
-fn test_rsplitator() {
+fn test_rsplit_iterator() {
     let xs = &[1, 2, 3, 4, 5];
 
     let splits: &[&[_]] = &[&[5], &[3], &[1]];
@@ -855,7 +855,7 @@ fn test_rsplitator() {
 }
 
 #[test]
-fn test_rsplitnator() {
+fn test_rsplitn_iterator() {
     let xs = &[1, 2, 3, 4, 5];
 
     let splits: &[&[_]] = &[&[1, 2, 3, 4, 5]];
@@ -932,7 +932,7 @@ fn test_split_iterators_size_hint() {
 }
 
 #[test]
-fn test_windowsator() {
+fn test_windows_iterator() {
     let v = &[1, 2, 3, 4];
 
     let wins: &[&[_]] = &[&[1, 2], &[2, 3], &[3, 4]];
@@ -948,13 +948,13 @@ fn test_windowsator() {
 
 #[test]
 #[should_panic]
-fn test_windowsator_0() {
+fn test_windows_iterator_0() {
     let v = &[1, 2, 3, 4];
     let _it = v.windows(0);
 }
 
 #[test]
-fn test_chunksator() {
+fn test_chunks_iterator() {
     let v = &[1, 2, 3, 4, 5];
 
     assert_eq!(v.chunks(2).len(), 3);
@@ -972,13 +972,13 @@ fn test_chunksator() {
 
 #[test]
 #[should_panic]
-fn test_chunksator_0() {
+fn test_chunks_iterator_0() {
     let v = &[1, 2, 3, 4];
     let _it = v.chunks(0);
 }
 
 #[test]
-fn test_chunks_exactator() {
+fn test_chunks_exact_iterator() {
     let v = &[1, 2, 3, 4, 5];
 
     assert_eq!(v.chunks_exact(2).len(), 2);
@@ -996,13 +996,13 @@ fn test_chunks_exactator() {
 
 #[test]
 #[should_panic]
-fn test_chunks_exactator_0() {
+fn test_chunks_exact_iterator_0() {
     let v = &[1, 2, 3, 4];
     let _it = v.chunks_exact(0);
 }
 
 #[test]
-fn test_rchunksator() {
+fn test_rchunks_iterator() {
     let v = &[1, 2, 3, 4, 5];
 
     assert_eq!(v.rchunks(2).len(), 3);
@@ -1020,13 +1020,13 @@ fn test_rchunksator() {
 
 #[test]
 #[should_panic]
-fn test_rchunksator_0() {
+fn test_rchunks_iterator_0() {
     let v = &[1, 2, 3, 4];
     let _it = v.rchunks(0);
 }
 
 #[test]
-fn test_rchunks_exactator() {
+fn test_rchunks_exact_iterator() {
     let v = &[1, 2, 3, 4, 5];
 
     assert_eq!(v.rchunks_exact(2).len(), 2);
@@ -1044,7 +1044,7 @@ fn test_rchunks_exactator() {
 
 #[test]
 #[should_panic]
-fn test_rchunks_exactator_0() {
+fn test_rchunks_exact_iterator_0() {
     let v = &[1, 2, 3, 4];
     let _it = v.rchunks_exact(0);
 }
@@ -1219,7 +1219,7 @@ fn test_ends_with() {
 }
 
 #[test]
-fn test_mut_splitator() {
+fn test_mut_split_iterator() {
     let mut xs = [0, 1, 0, 2, 3, 0, 0, 4, 5, 0];
     assert_eq!(xs.split_mut(|x| *x == 0).count(), 6);
     for slice in xs.split_mut(|x| *x == 0) {
@@ -1235,7 +1235,7 @@ fn test_mut_splitator() {
 }
 
 #[test]
-fn test_mut_splitator_rev() {
+fn test_mut_split_iterator_rev() {
     let mut xs = [1, 2, 0, 3, 4, 0, 0, 5, 6, 0];
     for slice in xs.split_mut(|x| *x == 0).rev().take(4) {
         slice.reverse();
diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs
index 3ee16f04e92..cc4c1f12728 100644
--- a/library/alloc/tests/vec.rs
+++ b/library/alloc/tests/vec.rs
@@ -2470,7 +2470,7 @@ fn test_vec_dedup_panicking() {
 
 // Regression test for issue #82533
 #[test]
-fn test_extend_from_within_panicing_clone() {
+fn test_extend_from_within_panicking_clone() {
     struct Panic<'dc> {
         drop_count: &'dc AtomicU32,
         aaaaa: bool,