Skip to content

Commit bef5bcf

Browse files
Fix typos.
1 parent 7111bba commit bef5bcf

File tree

11 files changed

+26
-26
lines changed

11 files changed

+26
-26
lines changed

book/src/tutorial-5.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ mod tests {
109109
}
110110
```
111111

112-
Now let's run `cargo test` again and verify that everying is linking and binding
112+
Now let's run `cargo test` again and verify that everything is linking and binding
113113
properly!
114114

115115
```bash

book/src/whitelisting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ variable definitions `bindgen` generates bindings for. By default, if we don't
55
specify any whitelisting rules, everything is considered whitelisted. This may
66
not be desirable because of either
77

8-
* the generated bindings contain a lot of extra defintions we don't plan on using, or
8+
* the generated bindings contain a lot of extra definitions we don't plan on using, or
99
* the header file contains C++ features for which Rust does not have a
1010
corresponding form (such as partial template specialization), and we would
1111
like to avoid these definitions

src/callbacks.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub trait ParseCallbacks: fmt::Debug + UnwindSafe {
3535
None
3636
}
3737

38-
/// This function should return whether, given the a given enum variant
38+
/// This function should return whether, given an enum variant
3939
/// name, and value, this enum variant will forcibly be a constant.
4040
fn enum_variant_behavior(
4141
&self,

src/clang.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ impl Type {
982982
}
983983
}
984984

985-
/// Get the canonical version of this type. This sees through `typdef`s and
985+
/// Get the canonical version of this type. This sees through `typedef`s and
986986
/// aliases to get the underlying, canonical type.
987987
pub fn canonical_type(&self) -> Type {
988988
unsafe {

src/codegen/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ impl CodeGenerator for Module {
400400
if result.saw_incomplete_array {
401401
utils::prepend_incomplete_array_types(ctx, &mut *result);
402402
}
403-
if ctx.need_bindegen_complex_type() {
403+
if ctx.need_bindgen_complex_type() {
404404
utils::prepend_complex_type(&mut *result);
405405
}
406406
if result.saw_objc {
@@ -3007,7 +3007,7 @@ impl TryToRustTy for Type {
30073007
TypeKind::Complex(fk) => {
30083008
let float_path = float_kind_rust_type(ctx, fk);
30093009

3010-
ctx.generated_bindegen_complex();
3010+
ctx.generated_bindgen_complex();
30113011
Ok(if ctx.options().enable_cxx_namespaces {
30123012
quote! {
30133013
root::__BindgenComplex<#float_path>

src/ir/comment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn make_indent(indent: usize) -> String {
3939
iter::repeat(' ').take(indent * RUST_INDENTATION).collect()
4040
}
4141

42-
/// Preprocesses mulitple single line comments.
42+
/// Preprocesses multiple single line comments.
4343
///
4444
/// Handles lines starting with both `//` and `///`.
4545
fn preprocess_single_lines(comment: &str, indent: usize) -> String {

src/ir/comp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ impl CompInfo {
13561356
// to be inserted in the map two times.
13571357
//
13581358
// I couldn't make a reduced test case, but anyway...
1359-
// Methods of template functions not only use to be inlined,
1359+
// Methods of template functions not only used to be inlined,
13601360
// but also instantiated, and we wouldn't be able to call
13611361
// them, so just bail out.
13621362
if !ci.template_params.is_empty() {

src/ir/context.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ pub struct BindgenContext {
373373
options: BindgenOptions,
374374

375375
/// Whether a bindgen complex was generated
376-
generated_bindegen_complex: Cell<bool>,
376+
generated_bindgen_complex: Cell<bool>,
377377

378378
/// The set of `ItemId`s that are whitelisted. This the very first thing
379379
/// computed after parsing our IR, and before running any of our analyses.
@@ -597,7 +597,7 @@ impl BindgenContext {
597597
translation_unit,
598598
target_info,
599599
options,
600-
generated_bindegen_complex: Cell::new(false),
600+
generated_bindgen_complex: Cell::new(false),
601601
whitelisted: None,
602602
codegen_items: None,
603603
used_template_parameters: None,
@@ -1538,7 +1538,7 @@ impl BindgenContext {
15381538
///
15391539
/// Note that `declaration_id` is not guaranteed to be in the context's item
15401540
/// set! It is possible that it is a partial type that we are still in the
1541-
/// middle of parsign.
1541+
/// middle of parsing.
15421542
fn get_declaration_info_for_template_instantiation(
15431543
&self,
15441544
instantiation: &Cursor,
@@ -1914,7 +1914,7 @@ impl BindgenContext {
19141914
/// Make a new item that is a resolved type reference to the `wrapped_id`.
19151915
///
19161916
/// This is unfortunately a lot of bloat, but is needed to properly track
1917-
/// constness et. al.
1917+
/// constness et al.
19181918
///
19191919
/// We should probably make the constness tracking separate, so it doesn't
19201920
/// bloat that much, but hey, we already bloat the heck out of builtin
@@ -2384,14 +2384,14 @@ impl BindgenContext {
23842384
}
23852385
}
23862386

2387-
/// Call if a binden complex is generated
2388-
pub fn generated_bindegen_complex(&self) {
2389-
self.generated_bindegen_complex.set(true)
2387+
/// Call if a bindgen complex is generated
2388+
pub fn generated_bindgen_complex(&self) {
2389+
self.generated_bindgen_complex.set(true)
23902390
}
23912391

2392-
/// Whether we need to generate the binden complex type
2393-
pub fn need_bindegen_complex_type(&self) -> bool {
2394-
self.generated_bindegen_complex.get()
2392+
/// Whether we need to generate the bindgen complex type
2393+
pub fn need_bindgen_complex_type(&self) -> bool {
2394+
self.generated_bindgen_complex.get()
23952395
}
23962396

23972397
/// Compute whether we can derive debug.
@@ -2563,7 +2563,7 @@ impl BindgenContext {
25632563
self.options().no_copy_types.matches(&name)
25642564
}
25652565

2566-
/// Chech if `--no-hash` flag is enabled for this item.
2566+
/// Check if `--no-hash` flag is enabled for this item.
25672567
pub fn no_hash_by_name(&self, item: &Item) -> bool {
25682568
let name = item.canonical_path(self)[1..].join("::");
25692569
self.options().no_hash_types.matches(&name)

src/ir/derive.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub trait CanDeriveCopy<'a> {
4343

4444
/// A trait that encapsulates the logic for whether or not we can trivially
4545
/// derive `Copy` without looking at any other types or results of fix point
46-
/// analsyses. This is a helper trait for fix point analysis.
46+
/// analyses. This is a helper trait for fix point analysis.
4747
pub trait CanTriviallyDeriveCopy {
4848
/// Return `true` if `Copy` can be trivially derived for this thing, `false`
4949
/// otherwise.

src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ impl Builder {
656656
///
657657
/// **Disabling this feature will almost certainly cause `bindgen` to emit
658658
/// bindings that will not compile!** If you disable this feature, then it
659-
/// is *your* responsiblity to provide definitions for every type that is
659+
/// is *your* responsibility to provide definitions for every type that is
660660
/// referenced from an explicitly whitelisted item. One way to provide the
661661
/// definitions is by using the [`Builder::raw_line`](#method.raw_line)
662662
/// method, another would be to define them in Rust and then `include!(...)`
@@ -1319,7 +1319,7 @@ struct BindgenOptions {
13191319
impl_debug: bool,
13201320

13211321
/// True if we should implement the PartialEq trait for C/C++ structures and types
1322-
/// that do not support autoamically deriving PartialEq.
1322+
/// that do not support automatically deriving PartialEq.
13231323
impl_partialeq: bool,
13241324

13251325
/// True if we should derive Copy trait implementations for C/C++ structures
@@ -1404,17 +1404,17 @@ struct BindgenOptions {
14041404
/// See the builder method description for more details.
14051405
conservative_inline_namespaces: bool,
14061406

1407-
/// Wether to keep documentation comments in the generated output. See the
1407+
/// Whether to keep documentation comments in the generated output. See the
14081408
/// documentation for more details.
14091409
generate_comments: bool,
14101410

14111411
/// Whether to generate inline functions. Defaults to false.
14121412
generate_inline_functions: bool,
14131413

1414-
/// Wether to whitelist types recursively. Defaults to true.
1414+
/// Whether to whitelist types recursively. Defaults to true.
14151415
whitelist_recursively: bool,
14161416

1417-
/// Intead of emitting 'use objc;' to files generated from objective c files,
1417+
/// Instead of emitting 'use objc;' to files generated from objective c files,
14181418
/// generate '#[macro_use] extern crate objc;'
14191419
objc_extern_crate: bool,
14201420

src/time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl<'a> Timer<'a> {
2222
}
2323
}
2424

25-
/// Sets whether or not the Timer will print a mesage
25+
/// Sets whether or not the Timer will print a message
2626
/// when it is dropped.
2727
pub fn with_output(mut self, output: bool) -> Self {
2828
self.output = output;

0 commit comments

Comments
 (0)