Skip to content

Commit 9babe98

Browse files
authoredApr 26, 2023
Rollup merge of #110419 - jsoref:spelling-library, r=jyn514
Spelling library Split per #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
2 parents ea8bd06 + 9a55e9e commit 9babe98

File tree

26 files changed

+61
-60
lines changed

26 files changed

+61
-60
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
@@ -2474,7 +2474,7 @@ extern "rust-intrinsic" {
24742474
/// This macro should be called as `assert_unsafe_precondition!([Generics](name: Type) => Expression)`
24752475
/// where the names specified will be moved into the macro as captured variables, and defines an item
24762476
/// to call `const_eval_select` on. The tokens inside the square brackets are used to denote generics
2477-
/// for the function declaractions and can be omitted if there is no generics.
2477+
/// for the function declarations and can be omitted if there is no generics.
24782478
///
24792479
/// # Safety
24802480
///
@@ -2733,7 +2733,7 @@ pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
27332733
// SAFETY: the safety contract for `copy` must be upheld by the caller.
27342734
unsafe {
27352735
assert_unsafe_precondition!(
2736-
"ptr::copy requires that both pointer arguments are aligned aligned and non-null",
2736+
"ptr::copy requires that both pointer arguments are aligned and non-null",
27372737
[T](src: *const T, dst: *mut T) =>
27382738
is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)
27392739
);

‎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
@@ -2126,7 +2126,7 @@ mod new_fn_ptr_impl {
21262126
/// assert_eq!(unsafe { raw_f2.read_unaligned() }, 2);
21272127
/// ```
21282128
///
2129-
/// See [`addr_of_mut`] for how to create a pointer to unininitialized data.
2129+
/// See [`addr_of_mut`] for how to create a pointer to uninitialized data.
21302130
/// Doing that with `addr_of` would not make much sense since one could only
21312131
/// read the data, and that would be Undefined Behavior.
21322132
#[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
@@ -4451,7 +4451,7 @@ impl<T, const N: usize> SlicePattern for [T; N] {
44514451
/// This will do `binomial(N + 1, 2) = N * (N + 1) / 2 = 0, 1, 3, 6, 10, ..`
44524452
/// comparison operations.
44534453
fn get_many_check_valid<const N: usize>(indices: &[usize; N], len: usize) -> bool {
4454-
// NB: The optimzer should inline the loops into a sequence
4454+
// NB: The optimizer should inline the loops into a sequence
44554455
// of instructions without additional branching.
44564456
let mut valid = true;
44574457
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/buffered/tests.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -831,9 +831,9 @@ fn partial_line_buffered_after_line_write() {
831831
assert_eq!(&writer.get_ref().buffer, b"Line 1\nLine 2\nLine 3");
832832
}
833833

834-
/// Test that, given a partial line that exceeds the length of
835-
/// LineBuffer's buffer (that is, without a trailing newline), that that
836-
/// line is written to the inner writer
834+
/// Test that for calls to LineBuffer::write where the passed bytes do not contain
835+
/// a newline and on their own are greater in length than the internal buffer, the
836+
/// passed bytes are immediately written to the inner writer.
837837
#[test]
838838
fn long_line_flushed() {
839839
let writer = ProgrammableSink::default();
@@ -844,9 +844,10 @@ fn long_line_flushed() {
844844
}
845845

846846
/// Test that, given a very long partial line *after* successfully
847-
/// flushing a complete line, that that line is buffered unconditionally,
848-
/// and no additional writes take place. This assures the property that
849-
/// `write` should make at-most-one attempt to write new data.
847+
/// flushing a complete line, the very long partial line is buffered
848+
/// unconditionally, and no additional writes take place. This assures
849+
/// the property that `write` should make at-most-one attempt to write
850+
/// new data.
850851
#[test]
851852
fn line_long_tail_not_flushed() {
852853
let writer = ProgrammableSink::default();

‎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

‎library/std/src/sync/remutex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::panic::{RefUnwindSafe, UnwindSafe};
77
use crate::sync::atomic::{AtomicUsize, Ordering::Relaxed};
88
use crate::sys::locks as sys;
99

10-
/// A re-entrant mutual exclusion
10+
/// A reentrant mutual exclusion
1111
///
1212
/// This mutex will block *other* threads waiting for the lock to become
1313
/// available. The thread which has already locked the mutex can lock it

‎library/std/src/sys/sgx/abi/entry.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ IMAGE_BASE:
5858
globvar DEBUG 1
5959
/* The base address (relative to enclave start) of the enclave text section */
6060
globvar TEXT_BASE 8
61-
/* The size in bytes of enclacve text section */
61+
/* The size in bytes of enclave text section */
6262
globvar TEXT_SIZE 8
6363
/* The base address (relative to enclave start) of the enclave .eh_frame_hdr section */
6464
globvar EH_FRM_HDR_OFFSET 8
6565
/* The size in bytes of enclave .eh_frame_hdr section */
6666
globvar EH_FRM_HDR_LEN 8
6767
/* The base address (relative to enclave start) of the enclave .eh_frame section */
6868
globvar EH_FRM_OFFSET 8
69-
/* The size in bytes of enclacve .eh_frame section */
69+
/* The size in bytes of enclave .eh_frame section */
7070
globvar EH_FRM_LEN 8
7171

7272
.org .Lxsave_clear+512

‎library/std/src/sys/unix/process/process_unix.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ impl ExitStatus {
735735
// true on all actual versions of Unix, is widely assumed, and is specified in SuS
736736
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not
737737
// true for a platform pretending to be Unix, the tests (our doctests, and also
738-
// procsss_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
738+
// process_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
739739
match NonZero_c_int::try_from(self.0) {
740740
/* was nonzero */ Ok(failure) => Err(ExitStatusError(failure)),
741741
/* was zero, couldn't convert */ Err(_) => Ok(()),

‎library/std/src/sys/unix/process/process_vxworks.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ impl ExitStatus {
199199
// true on all actual versions of Unix, is widely assumed, and is specified in SuS
200200
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not
201201
// true for a platform pretending to be Unix, the tests (our doctests, and also
202-
// procsss_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
202+
// process_unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
203203
match NonZero_c_int::try_from(self.0) {
204204
Ok(failure) => Err(ExitStatusError(failure)),
205205
Err(_) => Ok(()),

‎library/std/src/thread/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ impl Builder {
494494
MaybeDangling(mem::MaybeUninit::new(x))
495495
}
496496
fn into_inner(self) -> T {
497-
// SAFETY: we are always initiailized.
497+
// SAFETY: we are always initialized.
498498
let ret = unsafe { self.0.assume_init_read() };
499499
// Make sure we don't drop.
500500
mem::forget(self);
@@ -503,7 +503,7 @@ impl Builder {
503503
}
504504
impl<T> Drop for MaybeDangling<T> {
505505
fn drop(&mut self) {
506-
// SAFETY: we are always initiailized.
506+
// SAFETY: we are always initialized.
507507
unsafe { self.0.assume_init_drop() };
508508
}
509509
}

0 commit comments

Comments
 (0)
Please sign in to comment.