Skip to content

Commit 9cb9346

Browse files
committed
Spelling library/
* advance * aligned * borrowed * calculate * debugable * debuggable * declarations * desugaring * documentation * enclave * ignorable * initialized * iterator * kaboom * monomorphization * nonexistent * optimizer * panicking * process * reentrant * rustonomicon * the * uninitialized Signed-off-by: Josh Soref <[email protected]>
1 parent c6fb7b9 commit 9cb9346

File tree

25 files changed

+54
-54
lines changed

25 files changed

+54
-54
lines changed

library/alloc/src/collections/vec_deque/spec_from_iter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ where
1212
default fn spec_from_iter(iterator: I) -> Self {
1313
// Since converting is O(1) now, just re-use the `Vec` logic for
1414
// anything where we can't do something extra-special for `VecDeque`,
15-
// especially as that could save us some monomorphiziation work
15+
// especially as that could save us some monomorphization work
1616
// if one uses the same iterators (like slice ones) with both.
1717
crate::vec::Vec::from_iter(iterator).into()
1818
}

library/alloc/src/str.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,12 @@ impl str {
404404
// See https://www.unicode.org/versions/Unicode7.0.0/ch03.pdf#G33992
405405
// for the definition of `Final_Sigma`.
406406
debug_assert!('Σ'.len_utf8() == 2);
407-
let is_word_final = case_ignoreable_then_cased(from[..i].chars().rev())
408-
&& !case_ignoreable_then_cased(from[i + 2..].chars());
407+
let is_word_final = case_ignorable_then_cased(from[..i].chars().rev())
408+
&& !case_ignorable_then_cased(from[i + 2..].chars());
409409
to.push_str(if is_word_final { "ς" } else { "σ" });
410410
}
411411

412-
fn case_ignoreable_then_cased<I: Iterator<Item = char>>(iter: I) -> bool {
412+
fn case_ignorable_then_cased<I: Iterator<Item = char>>(iter: I) -> bool {
413413
use core::unicode::{Case_Ignorable, Cased};
414414
match iter.skip_while(|&c| Case_Ignorable(c)).next() {
415415
Some(c) => Cased(c),

library/alloc/src/vec/in_place_collect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ where
201201
//
202202
// Note: This access to the source wouldn't be allowed by the TrustedRandomIteratorNoCoerce
203203
// contract (used by SpecInPlaceCollect below). But see the "O(1) collect" section in the
204-
// module documenttation why this is ok anyway.
204+
// module documentation why this is ok anyway.
205205
let dst_guard = InPlaceDstBufDrop { ptr: dst_buf, len, cap };
206206
src.forget_allocation_drop_remaining();
207207
mem::forget(dst_guard);

library/alloc/tests/slice.rs

+21-21
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ fn test_move_rev_iterator() {
705705
}
706706

707707
#[test]
708-
fn test_splitator() {
708+
fn test_split_iterator() {
709709
let xs = &[1, 2, 3, 4, 5];
710710

711711
let splits: &[&[_]] = &[&[1], &[3], &[5]];
@@ -725,7 +725,7 @@ fn test_splitator() {
725725
}
726726

727727
#[test]
728-
fn test_splitator_inclusive() {
728+
fn test_split_iterator_inclusive() {
729729
let xs = &[1, 2, 3, 4, 5];
730730

731731
let splits: &[&[_]] = &[&[1, 2], &[3, 4], &[5]];
@@ -745,7 +745,7 @@ fn test_splitator_inclusive() {
745745
}
746746

747747
#[test]
748-
fn test_splitator_inclusive_reverse() {
748+
fn test_split_iterator_inclusive_reverse() {
749749
let xs = &[1, 2, 3, 4, 5];
750750

751751
let splits: &[&[_]] = &[&[5], &[3, 4], &[1, 2]];
@@ -765,7 +765,7 @@ fn test_splitator_inclusive_reverse() {
765765
}
766766

767767
#[test]
768-
fn test_splitator_mut_inclusive() {
768+
fn test_split_iterator_mut_inclusive() {
769769
let xs = &mut [1, 2, 3, 4, 5];
770770

771771
let splits: &[&[_]] = &[&[1, 2], &[3, 4], &[5]];
@@ -785,7 +785,7 @@ fn test_splitator_mut_inclusive() {
785785
}
786786

787787
#[test]
788-
fn test_splitator_mut_inclusive_reverse() {
788+
fn test_split_iterator_mut_inclusive_reverse() {
789789
let xs = &mut [1, 2, 3, 4, 5];
790790

791791
let splits: &[&[_]] = &[&[5], &[3, 4], &[1, 2]];
@@ -805,7 +805,7 @@ fn test_splitator_mut_inclusive_reverse() {
805805
}
806806

807807
#[test]
808-
fn test_splitnator() {
808+
fn test_splitn_iterator() {
809809
let xs = &[1, 2, 3, 4, 5];
810810

811811
let splits: &[&[_]] = &[&[1, 2, 3, 4, 5]];
@@ -821,7 +821,7 @@ fn test_splitnator() {
821821
}
822822

823823
#[test]
824-
fn test_splitnator_mut() {
824+
fn test_splitn_iterator_mut() {
825825
let xs = &mut [1, 2, 3, 4, 5];
826826

827827
let splits: &[&mut [_]] = &[&mut [1, 2, 3, 4, 5]];
@@ -837,7 +837,7 @@ fn test_splitnator_mut() {
837837
}
838838

839839
#[test]
840-
fn test_rsplitator() {
840+
fn test_rsplit_iterator() {
841841
let xs = &[1, 2, 3, 4, 5];
842842

843843
let splits: &[&[_]] = &[&[5], &[3], &[1]];
@@ -855,7 +855,7 @@ fn test_rsplitator() {
855855
}
856856

857857
#[test]
858-
fn test_rsplitnator() {
858+
fn test_rsplitn_iterator() {
859859
let xs = &[1, 2, 3, 4, 5];
860860

861861
let splits: &[&[_]] = &[&[1, 2, 3, 4, 5]];
@@ -932,7 +932,7 @@ fn test_split_iterators_size_hint() {
932932
}
933933

934934
#[test]
935-
fn test_windowsator() {
935+
fn test_windows_iterator() {
936936
let v = &[1, 2, 3, 4];
937937

938938
let wins: &[&[_]] = &[&[1, 2], &[2, 3], &[3, 4]];
@@ -948,13 +948,13 @@ fn test_windowsator() {
948948

949949
#[test]
950950
#[should_panic]
951-
fn test_windowsator_0() {
951+
fn test_windows_iterator_0() {
952952
let v = &[1, 2, 3, 4];
953953
let _it = v.windows(0);
954954
}
955955

956956
#[test]
957-
fn test_chunksator() {
957+
fn test_chunks_iterator() {
958958
let v = &[1, 2, 3, 4, 5];
959959

960960
assert_eq!(v.chunks(2).len(), 3);
@@ -972,13 +972,13 @@ fn test_chunksator() {
972972

973973
#[test]
974974
#[should_panic]
975-
fn test_chunksator_0() {
975+
fn test_chunks_iterator_0() {
976976
let v = &[1, 2, 3, 4];
977977
let _it = v.chunks(0);
978978
}
979979

980980
#[test]
981-
fn test_chunks_exactator() {
981+
fn test_chunks_exact_iterator() {
982982
let v = &[1, 2, 3, 4, 5];
983983

984984
assert_eq!(v.chunks_exact(2).len(), 2);
@@ -996,13 +996,13 @@ fn test_chunks_exactator() {
996996

997997
#[test]
998998
#[should_panic]
999-
fn test_chunks_exactator_0() {
999+
fn test_chunks_exact_iterator_0() {
10001000
let v = &[1, 2, 3, 4];
10011001
let _it = v.chunks_exact(0);
10021002
}
10031003

10041004
#[test]
1005-
fn test_rchunksator() {
1005+
fn test_rchunks_iterator() {
10061006
let v = &[1, 2, 3, 4, 5];
10071007

10081008
assert_eq!(v.rchunks(2).len(), 3);
@@ -1020,13 +1020,13 @@ fn test_rchunksator() {
10201020

10211021
#[test]
10221022
#[should_panic]
1023-
fn test_rchunksator_0() {
1023+
fn test_rchunks_iterator_0() {
10241024
let v = &[1, 2, 3, 4];
10251025
let _it = v.rchunks(0);
10261026
}
10271027

10281028
#[test]
1029-
fn test_rchunks_exactator() {
1029+
fn test_rchunks_exact_iterator() {
10301030
let v = &[1, 2, 3, 4, 5];
10311031

10321032
assert_eq!(v.rchunks_exact(2).len(), 2);
@@ -1044,7 +1044,7 @@ fn test_rchunks_exactator() {
10441044

10451045
#[test]
10461046
#[should_panic]
1047-
fn test_rchunks_exactator_0() {
1047+
fn test_rchunks_exact_iterator_0() {
10481048
let v = &[1, 2, 3, 4];
10491049
let _it = v.rchunks_exact(0);
10501050
}
@@ -1219,7 +1219,7 @@ fn test_ends_with() {
12191219
}
12201220

12211221
#[test]
1222-
fn test_mut_splitator() {
1222+
fn test_mut_split_iterator() {
12231223
let mut xs = [0, 1, 0, 2, 3, 0, 0, 4, 5, 0];
12241224
assert_eq!(xs.split_mut(|x| *x == 0).count(), 6);
12251225
for slice in xs.split_mut(|x| *x == 0) {
@@ -1235,7 +1235,7 @@ fn test_mut_splitator() {
12351235
}
12361236

12371237
#[test]
1238-
fn test_mut_splitator_rev() {
1238+
fn test_mut_split_iterator_rev() {
12391239
let mut xs = [1, 2, 0, 3, 4, 0, 0, 5, 6, 0];
12401240
for slice in xs.split_mut(|x| *x == 0).rev().take(4) {
12411241
slice.reverse();

library/alloc/tests/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2470,7 +2470,7 @@ fn test_vec_dedup_panicking() {
24702470

24712471
// Regression test for issue #82533
24722472
#[test]
2473-
fn test_extend_from_within_panicing_clone() {
2473+
fn test_extend_from_within_panicking_clone() {
24742474
struct Panic<'dc> {
24752475
drop_count: &'dc AtomicU32,
24762476
aaaaa: bool,

library/core/src/fmt/builders.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> {
109109
/// .field("bar", &self.bar) // We add `bar` field.
110110
/// .field("another", &self.another) // We add `another` field.
111111
/// // We even add a field which doesn't exist (because why not?).
112-
/// .field("not_existing_field", &1)
112+
/// .field("nonexistent_field", &1)
113113
/// .finish() // We're good to go!
114114
/// }
115115
/// }
116116
///
117117
/// assert_eq!(
118118
/// format!("{:?}", Bar { bar: 10, another: "Hello World".to_string() }),
119-
/// "Bar { bar: 10, another: \"Hello World\", not_existing_field: 1 }",
119+
/// "Bar { bar: 10, another: \"Hello World\", nonexistent_field: 1 }",
120120
/// );
121121
/// ```
122122
#[stable(feature = "debug_builders", since = "1.2.0")]

library/core/src/intrinsics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2460,7 +2460,7 @@ extern "rust-intrinsic" {
24602460
/// This macro should be called as `assert_unsafe_precondition!([Generics](name: Type) => Expression)`
24612461
/// where the names specified will be moved into the macro as captured variables, and defines an item
24622462
/// to call `const_eval_select` on. The tokens inside the square brackets are used to denote generics
2463-
/// for the function declaractions and can be omitted if there is no generics.
2463+
/// for the function declarations and can be omitted if there is no generics.
24642464
///
24652465
/// # Safety
24662466
///
@@ -2717,7 +2717,7 @@ pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
27172717
// SAFETY: the safety contract for `copy` must be upheld by the caller.
27182718
unsafe {
27192719
assert_unsafe_precondition!(
2720-
"ptr::copy requires that both pointer arguments are aligned aligned and non-null",
2720+
"ptr::copy requires that both pointer arguments are aligned and non-null",
27212721
[T](src: *const T, dst: *mut T) =>
27222722
is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)
27232723
);

library/core/src/macros/panic.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ the successful result of some computation, `Ok(T)`, or error types that
4242
represent an anticipated runtime failure mode of that computation, `Err(E)`.
4343
`Result` is used alongside user defined types which represent the various
4444
anticipated runtime failure modes that the associated computation could
45-
encounter. `Result` must be propagated manually, often with the the help of the
45+
encounter. `Result` must be propagated manually, often with the help of the
4646
`?` operator and `Try` trait, and they must be reported manually, often with
4747
the help of the `Error` trait.
4848

library/core/src/ptr/const_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl<T: ?Sized> *const T {
264264
let dest_addr = addr as isize;
265265
let offset = dest_addr.wrapping_sub(self_addr);
266266

267-
// This is the canonical desugarring of this operation
267+
// This is the canonical desugaring of this operation
268268
self.wrapping_byte_offset(offset)
269269
}
270270

library/core/src/ptr/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2121,7 +2121,7 @@ mod new_fn_ptr_impl {
21212121
/// assert_eq!(unsafe { raw_f2.read_unaligned() }, 2);
21222122
/// ```
21232123
///
2124-
/// See [`addr_of_mut`] for how to create a pointer to unininitialized data.
2124+
/// See [`addr_of_mut`] for how to create a pointer to uninitialized data.
21252125
/// Doing that with `addr_of` would not make much sense since one could only
21262126
/// read the data, and that would be Undefined Behavior.
21272127
#[stable(feature = "raw_ref_macros", since = "1.51.0")]

library/core/src/ptr/mut_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ impl<T: ?Sized> *mut T {
270270
let dest_addr = addr as isize;
271271
let offset = dest_addr.wrapping_sub(self_addr);
272272

273-
// This is the canonical desugarring of this operation
273+
// This is the canonical desugaring of this operation
274274
self.wrapping_byte_offset(offset)
275275
}
276276

library/core/src/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4458,7 +4458,7 @@ impl<T, const N: usize> SlicePattern for [T; N] {
44584458
/// This will do `binomial(N + 1, 2) = N * (N + 1) / 2 = 0, 1, 3, 6, 10, ..`
44594459
/// comparison operations.
44604460
fn get_many_check_valid<const N: usize>(indices: &[usize; N], len: usize) -> bool {
4461-
// NB: The optimzer should inline the loops into a sequence
4461+
// NB: The optimizer should inline the loops into a sequence
44624462
// of instructions without additional branching.
44634463
let mut valid = true;
44644464
for (i, &idx) in indices.iter().enumerate() {

library/core/tests/asserting.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ struct NoCopyNoDebug;
2424
struct NoDebug;
2525

2626
test!(
27-
capture_with_non_copyable_and_non_debugabble_elem_has_correct_params,
27+
capture_with_non_copyable_and_non_debuggable_elem_has_correct_params,
2828
NoCopyNoDebug,
2929
None,
3030
"N/A"
3131
);
3232

3333
test!(capture_with_non_copyable_elem_has_correct_params, NoCopy, None, "N/A");
3434

35-
test!(capture_with_non_debugabble_elem_has_correct_params, NoDebug, None, "N/A");
35+
test!(capture_with_non_debuggable_elem_has_correct_params, NoDebug, None, "N/A");
3636

37-
test!(capture_with_copyable_and_debugabble_elem_has_correct_params, 1i32, Some(1i32), "1");
37+
test!(capture_with_copyable_and_debuggable_elem_has_correct_params, 1i32, Some(1i32), "1");

library/core/tests/lazy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn once_cell() {
1010
c.get_or_init(|| 92);
1111
assert_eq!(c.get(), Some(&92));
1212

13-
c.get_or_init(|| panic!("Kabom!"));
13+
c.get_or_init(|| panic!("Kaboom!"));
1414
assert_eq!(c.get(), Some(&92));
1515
}
1616

library/core/tests/num/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ fn test_can_not_overflow() {
170170
for base in 2..=36 {
171171
let num = (<$t>::MAX as u128) + 1;
172172

173-
// Calcutate the string length for the smallest overflowing number:
173+
// Calculate the string length for the smallest overflowing number:
174174
let max_len_string = format_radix(num, base as u128);
175175
// Ensure that string length is deemed to potentially overflow:
176176
assert!(can_overflow::<$t>(base, &max_len_string));

library/std/src/io/readbuf/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn initialize_unfilled() {
3636
}
3737

3838
#[test]
39-
fn addvance_filled() {
39+
fn advance_filled() {
4040
let buf: &mut [_] = &mut [0; 16];
4141
let mut rbuf: BorrowedBuf<'_> = buf.into();
4242

library/std/src/keyword_docs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,7 @@ mod type_keyword {}
19251925
/// `unsafe_op_in_unsafe_fn` lint can be enabled to warn against that and require explicit unsafe
19261926
/// blocks even inside `unsafe fn`.
19271927
///
1928-
/// See the [Rustnomicon] and the [Reference] for more information.
1928+
/// See the [Rustonomicon] and the [Reference] for more information.
19291929
///
19301930
/// # Examples
19311931
///
@@ -2129,7 +2129,7 @@ mod type_keyword {}
21292129
/// [`impl`]: keyword.impl.html
21302130
/// [raw pointers]: ../reference/types/pointer.html
21312131
/// [memory safety]: ../book/ch19-01-unsafe-rust.html
2132-
/// [Rustnomicon]: ../nomicon/index.html
2132+
/// [Rustonomicon]: ../nomicon/index.html
21332133
/// [nomicon-soundness]: ../nomicon/safe-unsafe-meaning.html
21342134
/// [soundness]: https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#soundness-of-code--of-a-library
21352135
/// [Reference]: ../reference/unsafety.html

library/std/src/os/windows/io/handle.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ impl AsHandle for OwnedHandle {
450450
#[inline]
451451
fn as_handle(&self) -> BorrowedHandle<'_> {
452452
// Safety: `OwnedHandle` and `BorrowedHandle` have the same validity
453-
// invariants, and the `BorrowdHandle` is bounded by the lifetime
453+
// invariants, and the `BorrowedHandle` is bounded by the lifetime
454454
// of `&self`.
455455
unsafe { BorrowedHandle::borrow_raw(self.as_raw_handle()) }
456456
}

library/std/src/os/windows/io/socket.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ impl AsSocket for OwnedSocket {
260260
#[inline]
261261
fn as_socket(&self) -> BorrowedSocket<'_> {
262262
// Safety: `OwnedSocket` and `BorrowedSocket` have the same validity
263-
// invariants, and the `BorrowdSocket` is bounded by the lifetime
263+
// invariants, and the `BorrowedSocket` is bounded by the lifetime
264264
// of `&self`.
265265
unsafe { BorrowedSocket::borrow_raw(self.as_raw_socket()) }
266266
}

library/std/src/sync/once_lock/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn sync_once_cell() {
2424
assert_eq!(ONCE_CELL.get(), Some(&92));
2525
});
2626

27-
ONCE_CELL.get_or_init(|| panic!("Kabom!"));
27+
ONCE_CELL.get_or_init(|| panic!("Kaboom!"));
2828
assert_eq!(ONCE_CELL.get(), Some(&92));
2929
}
3030

0 commit comments

Comments
 (0)