From cfd0e684714b54e928caacf7b1f7ddcd91ce9996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Neusch=C3=A4fer?= Date: Mon, 11 Aug 2025 10:08:21 +0200 Subject: [PATCH] Fix a few typos They were found with `codespell`. --- ctest-next/src/generator.rs | 2 +- ctest-next/templates/test.rs | 6 +++--- ctest-next/tests/input/hierarchy.out.rs | 6 +++--- ctest-next/tests/input/macro.out.rs | 4 ++-- ctest-next/tests/input/simple.out.with-renames.rs | 6 +++--- ctest-next/tests/input/simple.out.with-skips.rs | 6 +++--- src/unix/linux_like/linux/musl/mod.rs | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ctest-next/src/generator.rs b/ctest-next/src/generator.rs index 36db70ffd1b7e..4a369bc088f60 100644 --- a/ctest-next/src/generator.rs +++ b/ctest-next/src/generator.rs @@ -22,7 +22,7 @@ type MappedName = Box Option>; type Skip = Box bool>; /// A function that determines whether a variable or field is volatile. type VolatileItem = Box bool>; -/// A function that determines whether a function arument is an array. +/// A function that determines whether a function argument is an array. type ArrayArg = Box bool>; /// A function that determines whether to skip a test, taking in the identifier name. type SkipTest = Box bool>; diff --git a/ctest-next/templates/test.rs b/ctest-next/templates/test.rs index fff33b2f51a6e..3ed11441a03cc 100644 --- a/ctest-next/templates/test.rs +++ b/ctest-next/templates/test.rs @@ -77,14 +77,14 @@ mod generated_tests { {%- for constant in ctx.const_tests +%} // Test that the value of the constant is the same in both Rust and C. - // This performs a byte by byte comparision of the constant value. + // This performs a byte by byte comparison of the constant value. pub fn {{ constant.test_name }}() { type T = {{ constant.rust_ty }}; extern "C" { fn ctest_const__{{ constant.id }}() -> *const T; } - /* HACK: The slices may contian uninitialized data! We do this because + /* HACK: The slices may contain uninitialized data! We do this because * there isn't a good way to recursively iterate all fields. */ let r_val: T = {{ constant.rust_val }}; @@ -261,7 +261,7 @@ mod generated_tests { let input_ptr = input.as_mut_ptr().cast::(); - // Fill the unitialized memory with a deterministic pattern. + // Fill the uninitialized memory with a deterministic pattern. // From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42. // From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42. for i in 0..SIZE { diff --git a/ctest-next/tests/input/hierarchy.out.rs b/ctest-next/tests/input/hierarchy.out.rs index e228e9ef28690..c15a705a9de44 100644 --- a/ctest-next/tests/input/hierarchy.out.rs +++ b/ctest-next/tests/input/hierarchy.out.rs @@ -46,14 +46,14 @@ mod generated_tests { } // Test that the value of the constant is the same in both Rust and C. - // This performs a byte by byte comparision of the constant value. + // This performs a byte by byte comparison of the constant value. pub fn ctest_const_ON() { type T = bool; extern "C" { fn ctest_const__ON() -> *const T; } - /* HACK: The slices may contian uninitialized data! We do this because + /* HACK: The slices may contain uninitialized data! We do this because * there isn't a good way to recursively iterate all fields. */ let r_val: T = ON; @@ -161,7 +161,7 @@ mod generated_tests { let input_ptr = input.as_mut_ptr().cast::(); - // Fill the unitialized memory with a deterministic pattern. + // Fill the uninitialized memory with a deterministic pattern. // From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42. // From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42. for i in 0..SIZE { diff --git a/ctest-next/tests/input/macro.out.rs b/ctest-next/tests/input/macro.out.rs index 95b52a2567d59..b930011688cc0 100644 --- a/ctest-next/tests/input/macro.out.rs +++ b/ctest-next/tests/input/macro.out.rs @@ -326,7 +326,7 @@ mod generated_tests { let input_ptr = input.as_mut_ptr().cast::(); - // Fill the unitialized memory with a deterministic pattern. + // Fill the uninitialized memory with a deterministic pattern. // From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42. // From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42. for i in 0..SIZE { @@ -450,7 +450,7 @@ mod generated_tests { let input_ptr = input.as_mut_ptr().cast::(); - // Fill the unitialized memory with a deterministic pattern. + // Fill the uninitialized memory with a deterministic pattern. // From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42. // From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42. for i in 0..SIZE { diff --git a/ctest-next/tests/input/simple.out.with-renames.rs b/ctest-next/tests/input/simple.out.with-renames.rs index 8e857409e54e8..15e01064ed7cc 100644 --- a/ctest-next/tests/input/simple.out.with-renames.rs +++ b/ctest-next/tests/input/simple.out.with-renames.rs @@ -435,7 +435,7 @@ mod generated_tests { let input_ptr = input.as_mut_ptr().cast::(); - // Fill the unitialized memory with a deterministic pattern. + // Fill the uninitialized memory with a deterministic pattern. // From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42. // From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42. for i in 0..SIZE { @@ -566,7 +566,7 @@ mod generated_tests { let input_ptr = input.as_mut_ptr().cast::(); - // Fill the unitialized memory with a deterministic pattern. + // Fill the uninitialized memory with a deterministic pattern. // From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42. // From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42. for i in 0..SIZE { @@ -690,7 +690,7 @@ mod generated_tests { let input_ptr = input.as_mut_ptr().cast::(); - // Fill the unitialized memory with a deterministic pattern. + // Fill the uninitialized memory with a deterministic pattern. // From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42. // From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42. for i in 0..SIZE { diff --git a/ctest-next/tests/input/simple.out.with-skips.rs b/ctest-next/tests/input/simple.out.with-skips.rs index 16eca78827330..c7ed6c60137ac 100644 --- a/ctest-next/tests/input/simple.out.with-skips.rs +++ b/ctest-next/tests/input/simple.out.with-skips.rs @@ -412,7 +412,7 @@ mod generated_tests { let input_ptr = input.as_mut_ptr().cast::(); - // Fill the unitialized memory with a deterministic pattern. + // Fill the uninitialized memory with a deterministic pattern. // From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42. // From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42. for i in 0..SIZE { @@ -543,7 +543,7 @@ mod generated_tests { let input_ptr = input.as_mut_ptr().cast::(); - // Fill the unitialized memory with a deterministic pattern. + // Fill the uninitialized memory with a deterministic pattern. // From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42. // From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42. for i in 0..SIZE { @@ -667,7 +667,7 @@ mod generated_tests { let input_ptr = input.as_mut_ptr().cast::(); - // Fill the unitialized memory with a deterministic pattern. + // Fill the uninitialized memory with a deterministic pattern. // From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42. // From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42. for i in 0..SIZE { diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 2d93282b2deca..bf2100cc60747 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -926,7 +926,7 @@ extern "C" { pub fn dirname(path: *mut c_char) -> *mut c_char; pub fn basename(path: *mut c_char) -> *mut c_char; - // Addded in `musl` 1.1.20 + // Added in `musl` 1.1.20 pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; // Added in `musl` 1.1.24