Skip to content

Commit d1c480f

Browse files
authored
Rollup merge of rust-lang#110154 - DaniPopes:library-typos, r=JohnTitor
Fix typos in library I ran [`typos -w library`](https://github.com/crate-ci/typos) to fix typos in the `library` directory. Refs rust-lang#110150
2 parents 5107c4c + a0daf22 commit d1c480f

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

library/core/src/intrinsics/mir.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
//! - The exception is the last arm, which must be `_ => basic_block` and corresponds to the
248248
//! otherwise branch.
249249
//! - [`Call`] has an associated function as well. The third argument of this function is a normal
250-
//! function call expresion, for example `my_other_function(a, 5)`.
250+
//! function call expression, for example `my_other_function(a, 5)`.
251251
//!
252252
253253
#![unstable(

library/core/src/slice/sort.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ where
14861486
}
14871487

14881488
/// Finds a streak of presorted elements starting at the beginning of the slice. Returns the first
1489-
/// value that is not part of said streak, and a bool denoting wether the streak was reversed.
1489+
/// value that is not part of said streak, and a bool denoting whether the streak was reversed.
14901490
/// Streaks can be increasing or decreasing.
14911491
fn find_streak<T, F>(v: &[T], is_less: &mut F) -> (usize, bool)
14921492
where

library/core/src/str/pattern.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool {
18911891

18921892
// SAFETY: Via the conditional above, we know that both `px` and `py`
18931893
// have the same length, so `px < pxend` implies that `py < pyend`.
1894-
// Thus, derefencing both `px` and `py` in the loop below is safe.
1894+
// Thus, dereferencing both `px` and `py` in the loop below is safe.
18951895
//
18961896
// Moreover, we set `pxend` and `pyend` to be 4 bytes before the actual
18971897
// end of `px` and `py`. Thus, the final dereference outside of the

library/std/src/sys/unix/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,7 @@ mod remove_dir_impl {
18931893
// file descriptor is automatically closed by libc::closedir() now, so give up ownership
18941894
let new_parent_fd = dir_fd.into_raw_fd();
18951895
// a valid root is not needed because we do not call any functions involving the full path
1896-
// of the DirEntrys.
1896+
// of the `DirEntry`s.
18971897
let dummy_root = PathBuf::new();
18981898
let inner = InnerReadDir { dirp, root: dummy_root };
18991899
Ok((ReadDir::new(inner), new_parent_fd))

library/std/src/sys/windows/c/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub const ERROR_RESOURCE_CALL_TIMED_OUT: DWORD = 5910;
1212
pub const FRS_ERR_SYSVOL_POPULATE_TIMEOUT: DWORD = 8014;
1313
pub const DNS_ERROR_RECORD_TIMED_OUT: DWORD = 9705;
1414

15-
// The followiung list was obtained from
15+
// The following list was obtained from
1616
// `/usr/x86_64-w64-mingw32/include/winerror.h`
1717
// in the Debian package
1818
// mingw-w64_6.0.0-3_all.deb

library/std/src/sys_common/thread_parking/id.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl Parker {
7979
park_timeout(dur, self.state.as_ptr().addr());
8080
// Swap to ensure that we observe all state changes with acquire
8181
// ordering, even if the state has been changed after the timeout
82-
// occured.
82+
// occurred.
8383
self.state.swap(EMPTY, Acquire);
8484
}
8585
}

library/test/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,14 @@ pub fn assert_test_result<T: Termination>(result: T) -> Result<(), String> {
219219

220220
struct FilteredTests {
221221
tests: Vec<(TestId, TestDescAndFn)>,
222-
benchs: Vec<(TestId, TestDescAndFn)>,
222+
benches: Vec<(TestId, TestDescAndFn)>,
223223
next_id: usize,
224224
}
225225

226226
impl FilteredTests {
227227
fn add_bench(&mut self, desc: TestDesc, testfn: TestFn) {
228228
let test = TestDescAndFn { desc, testfn };
229-
self.benchs.push((TestId(self.next_id), test));
229+
self.benches.push((TestId(self.next_id), test));
230230
self.next_id += 1;
231231
}
232232
fn add_test(&mut self, desc: TestDesc, testfn: TestFn) {
@@ -245,7 +245,7 @@ impl FilteredTests {
245245
self.add_test(desc, testfn);
246246
}
247247
fn total_len(&self) -> usize {
248-
self.tests.len() + self.benchs.len()
248+
self.tests.len() + self.benches.len()
249249
}
250250
}
251251

@@ -290,7 +290,7 @@ where
290290

291291
let tests_len = tests.len();
292292

293-
let mut filtered = FilteredTests { tests: Vec::new(), benchs: Vec::new(), next_id: 0 };
293+
let mut filtered = FilteredTests { tests: Vec::new(), benches: Vec::new(), next_id: 0 };
294294

295295
for test in filter_tests(opts, tests) {
296296
let mut desc = test.desc;
@@ -457,7 +457,7 @@ where
457457

458458
if opts.bench_benchmarks {
459459
// All benchmarks run at the end, in serial.
460-
for (id, b) in filtered.benchs {
460+
for (id, b) in filtered.benches {
461461
let event = TestEvent::TeWait(b.desc.clone());
462462
notify_about_test_event(event)?;
463463
let join_handle = run_test(opts, false, id, b, run_strategy, tx.clone());

0 commit comments

Comments
 (0)