Skip to content

Fix a few typos #4636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ctest-next/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type MappedName = Box<dyn Fn(&MapInput) -> Option<String>>;
type Skip = Box<dyn Fn(&MapInput) -> bool>;
/// A function that determines whether a variable or field is volatile.
type VolatileItem = Box<dyn Fn(VolatileItemKind) -> 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<dyn Fn(crate::Fn, Parameter) -> bool>;
/// A function that determines whether to skip a test, taking in the identifier name.
type SkipTest = Box<dyn Fn(&str) -> bool>;
Expand Down
6 changes: 3 additions & 3 deletions ctest-next/templates/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }};
Expand Down Expand Up @@ -261,7 +261,7 @@ mod generated_tests {

let input_ptr = input.as_mut_ptr().cast::<u8>();

// 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 {
Expand Down
6 changes: 3 additions & 3 deletions ctest-next/tests/input/hierarchy.out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -161,7 +161,7 @@ mod generated_tests {

let input_ptr = input.as_mut_ptr().cast::<u8>();

// 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 {
Expand Down
4 changes: 2 additions & 2 deletions ctest-next/tests/input/macro.out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ mod generated_tests {

let input_ptr = input.as_mut_ptr().cast::<u8>();

// 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 {
Expand Down Expand Up @@ -450,7 +450,7 @@ mod generated_tests {

let input_ptr = input.as_mut_ptr().cast::<u8>();

// 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 {
Expand Down
6 changes: 3 additions & 3 deletions ctest-next/tests/input/simple.out.with-renames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ mod generated_tests {

let input_ptr = input.as_mut_ptr().cast::<u8>();

// 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 {
Expand Down Expand Up @@ -566,7 +566,7 @@ mod generated_tests {

let input_ptr = input.as_mut_ptr().cast::<u8>();

// 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 {
Expand Down Expand Up @@ -690,7 +690,7 @@ mod generated_tests {

let input_ptr = input.as_mut_ptr().cast::<u8>();

// 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 {
Expand Down
6 changes: 3 additions & 3 deletions ctest-next/tests/input/simple.out.with-skips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ mod generated_tests {

let input_ptr = input.as_mut_ptr().cast::<u8>();

// 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 {
Expand Down Expand Up @@ -543,7 +543,7 @@ mod generated_tests {

let input_ptr = input.as_mut_ptr().cast::<u8>();

// 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 {
Expand Down Expand Up @@ -667,7 +667,7 @@ mod generated_tests {

let input_ptr = input.as_mut_ptr().cast::<u8>();

// 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 {
Expand Down
2 changes: 1 addition & 1 deletion src/unix/linux_like/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading