diff --git a/bindgen-tests/tests/expectations/tests/enum-doc-bitfield.rs b/bindgen-tests/tests/expectations/tests/enum-doc-bitfield.rs index e6e9ffaa65..ba73a8ea3e 100644 --- a/bindgen-tests/tests/expectations/tests/enum-doc-bitfield.rs +++ b/bindgen-tests/tests/expectations/tests/enum-doc-bitfield.rs @@ -4,11 +4,11 @@ impl B { pub const VAR_A: B = B(0); } impl B { - /// Document field with preceeding star + /// Document field with preceding star pub const VAR_B: B = B(1); } impl B { - /// Document field with preceeding exclamation + /// Document field with preceding exclamation pub const VAR_C: B = B(2); } impl B { @@ -20,7 +20,7 @@ impl B { pub const VAR_E: B = B(4); } impl B { - /** Document field with preceeding star, with a loong long multiline + /** Document field with preceding star, with a loong long multiline comment. Very interesting documentation, definitely.*/ diff --git a/bindgen-tests/tests/expectations/tests/enum-doc-mod.rs b/bindgen-tests/tests/expectations/tests/enum-doc-mod.rs index c54410e271..2b18b35df0 100644 --- a/bindgen-tests/tests/expectations/tests/enum-doc-mod.rs +++ b/bindgen-tests/tests/expectations/tests/enum-doc-mod.rs @@ -4,15 +4,15 @@ pub mod B { pub type Type = ::std::os::raw::c_uint; /// Document field with three slashes pub const VAR_A: Type = 0; - /// Document field with preceeding star + /// Document field with preceding star pub const VAR_B: Type = 1; - /// Document field with preceeding exclamation + /// Document field with preceding exclamation pub const VAR_C: Type = 2; ///< Document field with following star pub const VAR_D: Type = 3; ///< Document field with following exclamation pub const VAR_E: Type = 4; - /** Document field with preceeding star, with a loong long multiline + /** Document field with preceding star, with a loong long multiline comment. Very interesting documentation, definitely.*/ diff --git a/bindgen-tests/tests/expectations/tests/enum-doc-rusty.rs b/bindgen-tests/tests/expectations/tests/enum-doc-rusty.rs index a83d2dc458..3eec0759c5 100644 --- a/bindgen-tests/tests/expectations/tests/enum-doc-rusty.rs +++ b/bindgen-tests/tests/expectations/tests/enum-doc-rusty.rs @@ -5,15 +5,15 @@ pub enum B { /// Document field with three slashes VAR_A = 0, - /// Document field with preceeding star + /// Document field with preceding star VAR_B = 1, - /// Document field with preceeding exclamation + /// Document field with preceding exclamation VAR_C = 2, ///< Document field with following star VAR_D = 3, ///< Document field with following exclamation VAR_E = 4, - /** Document field with preceeding star, with a loong long multiline + /** Document field with preceding star, with a loong long multiline comment. Very interesting documentation, definitely.*/ diff --git a/bindgen-tests/tests/expectations/tests/enum-doc.rs b/bindgen-tests/tests/expectations/tests/enum-doc.rs index ee0ca23bff..98a7eed8f8 100644 --- a/bindgen-tests/tests/expectations/tests/enum-doc.rs +++ b/bindgen-tests/tests/expectations/tests/enum-doc.rs @@ -1,15 +1,15 @@ #![allow(dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals)] /// Document field with three slashes pub const B_VAR_A: B = 0; -/// Document field with preceeding star +/// Document field with preceding star pub const B_VAR_B: B = 1; -/// Document field with preceeding exclamation +/// Document field with preceding exclamation pub const B_VAR_C: B = 2; ///< Document field with following star pub const B_VAR_D: B = 3; ///< Document field with following exclamation pub const B_VAR_E: B = 4; -/** Document field with preceeding star, with a loong long multiline +/** Document field with preceding star, with a loong long multiline comment. Very interesting documentation, definitely.*/ diff --git a/bindgen-tests/tests/expectations/tests/issue-537-repr-packed-n.rs b/bindgen-tests/tests/expectations/tests/issue-537-repr-packed-n.rs index 3042551585..0142673f3e 100644 --- a/bindgen-tests/tests/expectations/tests/issue-537-repr-packed-n.rs +++ b/bindgen-tests/tests/expectations/tests/issue-537-repr-packed-n.rs @@ -23,7 +23,7 @@ fn bindgen_test_layout_AlignedToOne() { "Offset of field: AlignedToOne::i", ); } -/// This should be be packed because Rust 1.33 has `#[repr(packed(N))]`. +/// This should be packed because Rust 1.33 has `#[repr(packed(N))]`. #[repr(C, packed(2))] #[derive(Debug, Default, Copy, Clone)] pub struct AlignedToTwo { @@ -75,7 +75,7 @@ fn bindgen_test_layout_PackedToOne() { "Offset of field: PackedToOne::y", ); } -/// This should be be packed because Rust 1.33 has `#[repr(packed(N))]`. +/// This should be packed because Rust 1.33 has `#[repr(packed(N))]`. #[repr(C, packed(2))] #[derive(Debug, Default, Copy, Clone)] pub struct PackedToTwo { diff --git a/bindgen-tests/tests/headers/enum-doc.h b/bindgen-tests/tests/headers/enum-doc.h index 58e2c69e13..7a2f425cda 100644 --- a/bindgen-tests/tests/headers/enum-doc.h +++ b/bindgen-tests/tests/headers/enum-doc.h @@ -2,14 +2,14 @@ enum B { /// Document field with three slashes VAR_A = 0, - /** Document field with preceeding star */ + /** Document field with preceding star */ VAR_B = 1, - /*! Document field with preceeding exclamation */ + /*! Document field with preceding exclamation */ VAR_C = 2, VAR_D = 3, /**< Document field with following star */ VAR_E = 4, /*!< Document field with following exclamation */ /** - * Document field with preceeding star, with a loong long multiline + * Document field with preceding star, with a loong long multiline * comment. * * Very interesting documentation, definitely. diff --git a/bindgen-tests/tests/headers/issue-537-repr-packed-n.h b/bindgen-tests/tests/headers/issue-537-repr-packed-n.h index f4c0070a4a..7beaf88383 100644 --- a/bindgen-tests/tests/headers/issue-537-repr-packed-n.h +++ b/bindgen-tests/tests/headers/issue-537-repr-packed-n.h @@ -6,7 +6,7 @@ struct AlignedToOne { int i; } __attribute__ ((packed,aligned(1))); -/// This should be be packed because Rust 1.33 has `#[repr(packed(N))]`. +/// This should be packed because Rust 1.33 has `#[repr(packed(N))]`. struct AlignedToTwo { int i; } __attribute__ ((packed,aligned(2))); @@ -25,7 +25,7 @@ struct PackedToOne { #pragma pack(2) -/// This should be be packed because Rust 1.33 has `#[repr(packed(N))]`. +/// This should be packed because Rust 1.33 has `#[repr(packed(N))]`. struct PackedToTwo { int x; int y; diff --git a/bindgen-tests/tests/headers/template-param-usage-7.hpp b/bindgen-tests/tests/headers/template-param-usage-7.hpp index 99d4cc71b4..3d70cee145 100644 --- a/bindgen-tests/tests/headers/template-param-usage-7.hpp +++ b/bindgen-tests/tests/headers/template-param-usage-7.hpp @@ -6,5 +6,5 @@ class DoesNotUseU { V v; }; -// The bool should go away becuase U is not used. +// The bool should go away because U is not used. using Alias = DoesNotUseU; diff --git a/bindgen-tests/tests/headers/wrap-static-fns.h b/bindgen-tests/tests/headers/wrap-static-fns.h index 131b7ab15f..2be7bd93d9 100644 --- a/bindgen-tests/tests/headers/wrap-static-fns.h +++ b/bindgen-tests/tests/headers/wrap-static-fns.h @@ -1,7 +1,7 @@ // bindgen-flags: --experimental --wrap-static-fns // bindgen-parse-callbacks: wrap-as-variadic-fn -// to avoid poluting theexpectation tests we put the stdarg.h behind a conditional +// to avoid polluting the expectation tests we put the stdarg.h behind a conditional // variable only used in bindgen-integration #ifdef USE_VA_HEADER #include diff --git a/bindgen/codegen/mod.rs b/bindgen/codegen/mod.rs index 4e1bf1b6fc..b6f915a833 100644 --- a/bindgen/codegen/mod.rs +++ b/bindgen/codegen/mod.rs @@ -2557,7 +2557,7 @@ impl CodeGenerator for CompInfo { }; // Note we use `ptr::write_bytes()` instead of `mem::zeroed()` because the latter does // not necessarily ensure padding bytes are zeroed. Some C libraries are sensitive to - // non-zero padding bytes, especially when forwards/backwards compatability is + // non-zero padding bytes, especially when forwards/backwards compatibility is // involved. result.push(quote! { impl #generics Default for #ty_for_impl { diff --git a/bindgen/ir/analysis/has_type_param_in_array.rs b/bindgen/ir/analysis/has_type_param_in_array.rs index 088c08f542..6665547ca6 100644 --- a/bindgen/ir/analysis/has_type_param_in_array.rs +++ b/bindgen/ir/analysis/has_type_param_in_array.rs @@ -17,7 +17,7 @@ use crate::{HashMap, HashSet}; /// * If T is a type alias, a templated alias or an indirection to another type, /// it has type parameter in array if the type T refers to has. /// * If T is a compound type, it has array if any of base memter or field -/// has type paramter in array. +/// has type parameter in array. /// * If T is an instantiation of an abstract template definition, T has /// type parameter in array if any of the template arguments or template definition /// has. diff --git a/bindgen/options/mod.rs b/bindgen/options/mod.rs index dc453b13aa..f374d20732 100644 --- a/bindgen/options/mod.rs +++ b/bindgen/options/mod.rs @@ -1981,7 +1981,7 @@ options! { }, as_args: "--wrap-unsafe-ops", }, - /// Patterns for functions whose ABI should be overriden. + /// Patterns for functions whose ABI should be overridden. abi_overrides: HashMap { methods: { regex_option! { diff --git a/book/src/cpp.md b/book/src/cpp.md index 9b451b9d35..db368f6787 100644 --- a/book/src/cpp.md +++ b/book/src/cpp.md @@ -154,6 +154,6 @@ instance.assume_init_mut().method(); ``` You can easily verify this fact if you provide a implementation for `MyClass` -and `method` that prints the the `this` pointer address. However, you can +and `method` that prints the `this` pointer address. However, you can ignore this fact if you know that the original C++ code does not rely on the instance address in its internal logic. diff --git a/book/src/using-unions.md b/book/src/using-unions.md index 9e8e9b99d7..5ae764a33d 100644 --- a/book/src/using-unions.md +++ b/book/src/using-unions.md @@ -66,11 +66,11 @@ When using the `union` builtin type, there are two choices for initialization: mod bindings_builtin_union; fn union_builtin() { - // Initalize the union to zero + // Initialize the union to zero let x = bindings_builtin_union::greek_t::default(); // If `--with-derive-default` option is not used, the following may be used - // to initalize the union to zero: + // to initialize the union to zero: let x = unsafe { std::mem::zeroed::() }; // Or, it is possible to initialize exactly one variant of the enum: