Skip to content

Fix typos. #1330

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
Jun 13, 2018
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 book/src/tutorial-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ mod tests {
}
```

Now let's run `cargo test` again and verify that everying is linking and binding
Now let's run `cargo test` again and verify that everything is linking and binding
properly!

```bash
Expand Down
2 changes: 1 addition & 1 deletion book/src/whitelisting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ variable definitions `bindgen` generates bindings for. By default, if we don't
specify any whitelisting rules, everything is considered whitelisted. This may
not be desirable because of either

* the generated bindings contain a lot of extra defintions we don't plan on using, or
* the generated bindings contain a lot of extra definitions we don't plan on using, or
* the header file contains C++ features for which Rust does not have a
corresponding form (such as partial template specialization), and we would
like to avoid these definitions
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub trait ParseCallbacks: fmt::Debug + UnwindSafe {
None
}

/// This function should return whether, given the a given enum variant
/// This function should return whether, given an enum variant
/// name, and value, this enum variant will forcibly be a constant.
fn enum_variant_behavior(
&self,
Expand Down
2 changes: 1 addition & 1 deletion src/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ impl Type {
}
}

/// Get the canonical version of this type. This sees through `typdef`s and
/// Get the canonical version of this type. This sees through `typedef`s and
/// aliases to get the underlying, canonical type.
pub fn canonical_type(&self) -> Type {
unsafe {
Expand Down
4 changes: 2 additions & 2 deletions src/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ impl CodeGenerator for Module {
if result.saw_incomplete_array {
utils::prepend_incomplete_array_types(ctx, &mut *result);
}
if ctx.need_bindegen_complex_type() {
if ctx.need_bindgen_complex_type() {
utils::prepend_complex_type(&mut *result);
}
if result.saw_objc {
Expand Down Expand Up @@ -3007,7 +3007,7 @@ impl TryToRustTy for Type {
TypeKind::Complex(fk) => {
let float_path = float_kind_rust_type(ctx, fk);

ctx.generated_bindegen_complex();
ctx.generated_bindgen_complex();
Ok(if ctx.options().enable_cxx_namespaces {
quote! {
root::__BindgenComplex<#float_path>
Expand Down
2 changes: 1 addition & 1 deletion src/ir/comment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn make_indent(indent: usize) -> String {
iter::repeat(' ').take(indent * RUST_INDENTATION).collect()
}

/// Preprocesses mulitple single line comments.
/// Preprocesses multiple single line comments.
///
/// Handles lines starting with both `//` and `///`.
fn preprocess_single_lines(comment: &str, indent: usize) -> String {
Expand Down
2 changes: 1 addition & 1 deletion src/ir/comp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ impl CompInfo {
// to be inserted in the map two times.
//
// I couldn't make a reduced test case, but anyway...
// Methods of template functions not only use to be inlined,
// Methods of template functions not only used to be inlined,
// but also instantiated, and we wouldn't be able to call
// them, so just bail out.
if !ci.template_params.is_empty() {
Expand Down
22 changes: 11 additions & 11 deletions src/ir/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ pub struct BindgenContext {
options: BindgenOptions,

/// Whether a bindgen complex was generated
generated_bindegen_complex: Cell<bool>,
generated_bindgen_complex: Cell<bool>,

/// The set of `ItemId`s that are whitelisted. This the very first thing
/// computed after parsing our IR, and before running any of our analyses.
Expand Down Expand Up @@ -597,7 +597,7 @@ impl BindgenContext {
translation_unit,
target_info,
options,
generated_bindegen_complex: Cell::new(false),
generated_bindgen_complex: Cell::new(false),
whitelisted: None,
codegen_items: None,
used_template_parameters: None,
Expand Down Expand Up @@ -1538,7 +1538,7 @@ impl BindgenContext {
///
/// Note that `declaration_id` is not guaranteed to be in the context's item
/// set! It is possible that it is a partial type that we are still in the
/// middle of parsign.
/// middle of parsing.
fn get_declaration_info_for_template_instantiation(
&self,
instantiation: &Cursor,
Expand Down Expand Up @@ -1914,7 +1914,7 @@ impl BindgenContext {
/// Make a new item that is a resolved type reference to the `wrapped_id`.
///
/// This is unfortunately a lot of bloat, but is needed to properly track
/// constness et. al.
/// constness et al.
///
/// We should probably make the constness tracking separate, so it doesn't
/// bloat that much, but hey, we already bloat the heck out of builtin
Expand Down Expand Up @@ -2384,14 +2384,14 @@ impl BindgenContext {
}
}

/// Call if a binden complex is generated
pub fn generated_bindegen_complex(&self) {
self.generated_bindegen_complex.set(true)
/// Call if a bindgen complex is generated
pub fn generated_bindgen_complex(&self) {
self.generated_bindgen_complex.set(true)
}

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

/// Compute whether we can derive debug.
Expand Down Expand Up @@ -2563,7 +2563,7 @@ impl BindgenContext {
self.options().no_copy_types.matches(&name)
}

/// Chech if `--no-hash` flag is enabled for this item.
/// Check if `--no-hash` flag is enabled for this item.
pub fn no_hash_by_name(&self, item: &Item) -> bool {
let name = item.canonical_path(self)[1..].join("::");
self.options().no_hash_types.matches(&name)
Expand Down
2 changes: 1 addition & 1 deletion src/ir/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub trait CanDeriveCopy<'a> {

/// A trait that encapsulates the logic for whether or not we can trivially
/// derive `Copy` without looking at any other types or results of fix point
/// analsyses. This is a helper trait for fix point analysis.
/// analyses. This is a helper trait for fix point analysis.
pub trait CanTriviallyDeriveCopy {
/// Return `true` if `Copy` can be trivially derived for this thing, `false`
/// otherwise.
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ impl Builder {
///
/// **Disabling this feature will almost certainly cause `bindgen` to emit
/// bindings that will not compile!** If you disable this feature, then it
/// is *your* responsiblity to provide definitions for every type that is
/// is *your* responsibility to provide definitions for every type that is
/// referenced from an explicitly whitelisted item. One way to provide the
/// definitions is by using the [`Builder::raw_line`](#method.raw_line)
/// method, another would be to define them in Rust and then `include!(...)`
Expand Down Expand Up @@ -1319,7 +1319,7 @@ struct BindgenOptions {
impl_debug: bool,

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

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

/// Wether to keep documentation comments in the generated output. See the
/// Whether to keep documentation comments in the generated output. See the
/// documentation for more details.
generate_comments: bool,

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

/// Wether to whitelist types recursively. Defaults to true.
/// Whether to whitelist types recursively. Defaults to true.
whitelist_recursively: bool,

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

Expand Down
2 changes: 1 addition & 1 deletion src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl<'a> Timer<'a> {
}
}

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