Skip to content

Commit d200afe

Browse files
committed
Fix a few typos
They were found with `codespell`.
1 parent bbafd45 commit d200afe

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

ctest-next/src/generator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type MappedName = Box<dyn Fn(&MapInput) -> Option<String>>;
2222
type Skip = Box<dyn Fn(&MapInput) -> bool>;
2323
/// A function that determines whether a variable or field is volatile.
2424
type VolatileItem = Box<dyn Fn(VolatileItemKind) -> bool>;
25-
/// A function that determines whether a function arument is an array.
25+
/// A function that determines whether a function argument is an array.
2626
type ArrayArg = Box<dyn Fn(crate::Fn, Parameter) -> bool>;
2727
/// A function that determines whether to skip a test, taking in the identifier name.
2828
type SkipTest = Box<dyn Fn(&str) -> bool>;

ctest-next/templates/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ mod generated_tests {
7777
{%- for constant in ctx.const_tests +%}
7878

7979
// Test that the value of the constant is the same in both Rust and C.
80-
// This performs a byte by byte comparision of the constant value.
80+
// This performs a byte by byte comparison of the constant value.
8181
pub fn {{ constant.test_name }}() {
8282
type T = {{ constant.rust_ty }};
8383
extern "C" {
8484
fn ctest_const__{{ constant.id }}() -> *const T;
8585
}
8686

87-
/* HACK: The slices may contian uninitialized data! We do this because
87+
/* HACK: The slices may contain uninitialized data! We do this because
8888
* there isn't a good way to recursively iterate all fields. */
8989

9090
let r_val: T = {{ constant.rust_val }};
@@ -261,7 +261,7 @@ mod generated_tests {
261261

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

264-
// Fill the unitialized memory with a deterministic pattern.
264+
// Fill the uninitialized memory with a deterministic pattern.
265265
// From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42.
266266
// From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42.
267267
for i in 0..SIZE {

ctest-next/tests/input/hierarchy.out.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ mod generated_tests {
4646
}
4747

4848
// Test that the value of the constant is the same in both Rust and C.
49-
// This performs a byte by byte comparision of the constant value.
49+
// This performs a byte by byte comparison of the constant value.
5050
pub fn ctest_const_ON() {
5151
type T = bool;
5252
extern "C" {
5353
fn ctest_const__ON() -> *const T;
5454
}
5555

56-
/* HACK: The slices may contian uninitialized data! We do this because
56+
/* HACK: The slices may contain uninitialized data! We do this because
5757
* there isn't a good way to recursively iterate all fields. */
5858

5959
let r_val: T = ON;
@@ -161,7 +161,7 @@ mod generated_tests {
161161

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

164-
// Fill the unitialized memory with a deterministic pattern.
164+
// Fill the uninitialized memory with a deterministic pattern.
165165
// From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42.
166166
// From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42.
167167
for i in 0..SIZE {

ctest-next/tests/input/macro.out.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ mod generated_tests {
326326

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

329-
// Fill the unitialized memory with a deterministic pattern.
329+
// Fill the uninitialized memory with a deterministic pattern.
330330
// From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42.
331331
// From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42.
332332
for i in 0..SIZE {
@@ -450,7 +450,7 @@ mod generated_tests {
450450

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

453-
// Fill the unitialized memory with a deterministic pattern.
453+
// Fill the uninitialized memory with a deterministic pattern.
454454
// From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42.
455455
// From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42.
456456
for i in 0..SIZE {

ctest-next/tests/input/simple.out.with-renames.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ mod generated_tests {
435435

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

438-
// Fill the unitialized memory with a deterministic pattern.
438+
// Fill the uninitialized memory with a deterministic pattern.
439439
// From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42.
440440
// From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42.
441441
for i in 0..SIZE {
@@ -566,7 +566,7 @@ mod generated_tests {
566566

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

569-
// Fill the unitialized memory with a deterministic pattern.
569+
// Fill the uninitialized memory with a deterministic pattern.
570570
// From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42.
571571
// From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42.
572572
for i in 0..SIZE {
@@ -690,7 +690,7 @@ mod generated_tests {
690690

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

693-
// Fill the unitialized memory with a deterministic pattern.
693+
// Fill the uninitialized memory with a deterministic pattern.
694694
// From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42.
695695
// From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42.
696696
for i in 0..SIZE {

ctest-next/tests/input/simple.out.with-skips.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ mod generated_tests {
412412

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

415-
// Fill the unitialized memory with a deterministic pattern.
415+
// Fill the uninitialized memory with a deterministic pattern.
416416
// From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42.
417417
// From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42.
418418
for i in 0..SIZE {
@@ -543,7 +543,7 @@ mod generated_tests {
543543

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

546-
// Fill the unitialized memory with a deterministic pattern.
546+
// Fill the uninitialized memory with a deterministic pattern.
547547
// From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42.
548548
// From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42.
549549
for i in 0..SIZE {
@@ -667,7 +667,7 @@ mod generated_tests {
667667

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

670-
// Fill the unitialized memory with a deterministic pattern.
670+
// Fill the uninitialized memory with a deterministic pattern.
671671
// From Rust to C: every byte will be labelled from 1 to 255, with 0 turning into 42.
672672
// From C to Rust: every byte will be inverted from before (254 -> 1), but 0 is still 42.
673673
for i in 0..SIZE {

src/unix/linux_like/linux/musl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ extern "C" {
926926
pub fn dirname(path: *mut c_char) -> *mut c_char;
927927
pub fn basename(path: *mut c_char) -> *mut c_char;
928928

929-
// Addded in `musl` 1.1.20
929+
// Added in `musl` 1.1.20
930930
pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t;
931931

932932
// Added in `musl` 1.1.24

0 commit comments

Comments
 (0)