diff --git a/bindgen/codegen/mod.rs b/bindgen/codegen/mod.rs index 7c1c55abb5..e2aaee9820 100644 --- a/bindgen/codegen/mod.rs +++ b/bindgen/codegen/mod.rs @@ -1658,13 +1658,13 @@ fn access_specifier( /// Compute a fields or structs visibility based on multiple conditions. /// 1. If the element was declared public, and we respect such CXX accesses specs -/// (context option) => By default Public, but this can be overruled by an `annotation`. +/// (context option) => By default Public, but this can be overruled by an `annotation`. /// /// 2. If the element was declared private, and we respect such CXX accesses specs -/// (context option) => By default Private, but this can be overruled by an `annotation`. +/// (context option) => By default Private, but this can be overruled by an `annotation`. /// /// 3. If we do not respect visibility modifiers, the result depends on the `annotation`, -/// if any, or the passed `default_kind`. +/// if any, or the passed `default_kind`. /// fn compute_visibility( ctx: &BindgenContext, diff --git a/bindgen/ir/analysis/sizedness.rs b/bindgen/ir/analysis/sizedness.rs index ea93f2f103..edcf47f5c6 100644 --- a/bindgen/ir/analysis/sizedness.rs +++ b/bindgen/ir/analysis/sizedness.rs @@ -87,13 +87,13 @@ impl ops::BitOrAssign for SizednessResult { /// An analysis that computes the sizedness of all types. /// /// * For types with known sizes -- for example pointers, scalars, etc... -- -/// they are assigned `NonZeroSized`. +/// they are assigned `NonZeroSized`. /// /// * For compound structure types with one or more fields, they are assigned -/// `NonZeroSized`. +/// `NonZeroSized`. /// /// * For compound structure types without any fields, the results of the bases -/// are `join`ed. +/// are `join`ed. /// /// * For type parameters, `DependsOnTypeParam` is assigned. #[derive(Debug)] diff --git a/bindgen/ir/analysis/template_params.rs b/bindgen/ir/analysis/template_params.rs index e4261cf675..a35dcd98e3 100644 --- a/bindgen/ir/analysis/template_params.rs +++ b/bindgen/ir/analysis/template_params.rs @@ -124,8 +124,8 @@ use crate::{HashMap, HashSet}; /// ``` /// /// * Finally, for all other IR item kinds, we use our lattice's `join` -/// operation: set union with each successor of the given item's template -/// parameter usage: +/// operation: set union with each successor of the given item's template +/// parameter usage: /// /// ```ignore /// template_param_usage(v) = diff --git a/bindgen/ir/derive.rs b/bindgen/ir/derive.rs index 7491e3efc4..5475ffdb22 100644 --- a/bindgen/ir/derive.rs +++ b/bindgen/ir/derive.rs @@ -3,10 +3,10 @@ //! These traits tend to come in pairs: //! //! 1. A "trivial" version, whose implementations aren't allowed to recursively -//! look at other types or the results of fix point analyses. +//! look at other types or the results of fix point analyses. //! //! 2. A "normal" version, whose implementations simply query the results of a -//! fix point analysis. +//! fix point analysis. //! //! The former is used by the analyses when creating the results queried by the //! second. diff --git a/bindgen/ir/template.rs b/bindgen/ir/template.rs index 4dd8442c58..59bd4bfde4 100644 --- a/bindgen/ir/template.rs +++ b/bindgen/ir/template.rs @@ -4,7 +4,7 @@ //! brief definitions: //! //! * "Template definition": a class/struct/alias/function definition that takes -//! generic template parameters. For example: +//! generic template parameters. For example: //! //! ```c++ //! template @@ -14,11 +14,11 @@ //! ``` //! //! * "Template instantiation": an instantiation is a use of a template with -//! concrete template arguments. For example, `List`. +//! concrete template arguments. For example, `List`. //! //! * "Template specialization": an alternative template definition providing a -//! custom definition for instantiations with the matching template -//! arguments. This C++ feature is unsupported by bindgen. For example: +//! custom definition for instantiations with the matching template +//! arguments. This C++ feature is unsupported by bindgen. For example: //! //! ```c++ //! template<> diff --git a/bindgen/options/mod.rs b/bindgen/options/mod.rs index d1486397bd..e4c03ecd4d 100644 --- a/bindgen/options/mod.rs +++ b/bindgen/options/mod.rs @@ -35,20 +35,20 @@ use helpers::ignore; /// a block of code with the following items: /// /// - `default`: The default value for the field. If this item is omitted, `Default::default()` is -/// used instead, meaning that the type of the field must implement `Default`. +/// used instead, meaning that the type of the field must implement `Default`. /// - `methods`: A block of code containing methods for the `Builder` type. These methods should be -/// related to the field being declared. +/// related to the field being declared. /// - `as_args`: This item declares how the field should be converted into a valid CLI argument for -/// `bindgen` and is used in the [`Builder::command_line_flags`] method which is used to do a -/// roundtrip test of the CLI args in the `bindgen-test` crate. This item can take one of the -/// following: +/// `bindgen` and is used in the [`Builder::command_line_flags`] method which is used to do a +/// roundtrip test of the CLI args in the `bindgen-test` crate. This item can take one of the +/// following: /// - A string literal with the flag if the type of the field implements the [`AsArgs`] trait. /// - A closure with the signature `|field, args: &mut Vec| -> ()` that pushes arguments -/// into the `args` buffer based on the value of the field. This is used if the field does not -/// implement `AsArgs` or if the implementation of the trait is not logically correct for the -/// option and a custom behavior must be taken into account. +/// into the `args` buffer based on the value of the field. This is used if the field does not +/// implement `AsArgs` or if the implementation of the trait is not logically correct for the +/// option and a custom behavior must be taken into account. /// - The `ignore` literal, which does not emit any CLI arguments for this field. This is useful -/// if the field cannot be used from the `bindgen` CLI. +/// if the field cannot be used from the `bindgen` CLI. /// /// As an example, this would be the declaration of a `bool` field called `be_fun` whose default /// value is `false` (the `Default` value for `bool`):