]> git.lizzy.rs Git - rust.git/commitdiff
Fix typos “a”→“an”
authorFrank Steffahn <frank.steffahn@stu.uni-kiel.de>
Sun, 22 Aug 2021 12:46:15 +0000 (14:46 +0200)
committerFrank Steffahn <frank.steffahn@stu.uni-kiel.de>
Sun, 22 Aug 2021 13:35:11 +0000 (15:35 +0200)
clippy_lints/src/loops/manual_memcpy.rs
clippy_lints/src/non_copy_const.rs
clippy_lints/src/ranges.rs
clippy_lints/src/shadow.rs
clippy_lints/src/utils/conf.rs
clippy_utils/src/consts.rs
clippy_utils/src/lib.rs
clippy_utils/src/sugg.rs
tests/ui/declare_interior_mutable_const/traits.rs

index 2525b14e1c5c3dbb8a8d461ba2a1e2a4877f0260..2296842e86f556ae6dc64572f0e440146ba6d7f7 100644 (file)
@@ -268,7 +268,7 @@ fn sub(self, rhs: &MinifyingSugg<'static>) -> MinifyingSugg<'static> {
     }
 }
 
-/// a wrapper around `MinifyingSugg`, which carries a operator like currying
+/// a wrapper around `MinifyingSugg`, which carries an operator like currying
 /// so that the suggested code become more efficient (e.g. `foo + -bar` `foo - bar`).
 struct Offset {
     value: MinifyingSugg<'static>,
index aa3067876ebf827b75eb0ca6c770ebfeda347107..6c2563358cafe4d04f0e6c76281f562a376fdb72 100644 (file)
@@ -293,7 +293,7 @@ fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<
                 }) => {
                     if_chain! {
                         // Lint a trait impl item only when the definition is a generic type,
-                        // assuming a assoc const is not meant to be a interior mutable type.
+                        // assuming an assoc const is not meant to be an interior mutable type.
                         if let Some(of_trait_def_id) = of_trait_ref.trait_def_id();
                         if let Some(of_assoc_item) = specialization_graph::Node::Trait(of_trait_def_id)
                             .item(cx.tcx, impl_item.ident, AssocKind::Const, of_trait_def_id);
index 0114a2f97a2287d84a82269d9f5dd19f08e81dfa..4fa361fedafac434dbd26510c421506bed51e0b8 100644 (file)
@@ -51,7 +51,7 @@
     ///
     /// ### Known problems
     /// Will add unnecessary pair of parentheses when the
-    /// expression is not wrapped in a pair but starts with a opening parenthesis
+    /// expression is not wrapped in a pair but starts with an opening parenthesis
     /// and ends with a closing one.
     /// I.e., `let _ = (f()+1)..(f()+1)` results in `let _ = ((f()+1)..=f())`.
     ///
index b28a37cabd40ca6608593e76bbc49f87e0464a6d..b9e317a3cfd03af73f46ea09bc2f6997936fb107 100644 (file)
@@ -74,7 +74,7 @@
 declare_clippy_lint! {
     /// ### What it does
     /// Checks for bindings that shadow other bindings already in
-    /// scope, either without a initialization or with one that does not even use
+    /// scope, either without an initialization or with one that does not even use
     /// the original value.
     ///
     /// ### Why is this bad?
index a28b1d78f7d463a90f593306b1343ea0dc417bec..c192f9094a8a97bdfd840c3edfd27e09948d61e4 100644 (file)
@@ -198,7 +198,7 @@ pub(crate) fn get_configuration_metadata() -> Vec<ClippyConfiguration> {
     (enum_variant_name_threshold: u64 = 3),
     /// Lint: LARGE_ENUM_VARIANT.
     ///
-    /// The maximum size of a enum's variant to avoid box suggestion
+    /// The maximum size of an enum's variant to avoid box suggestion
     (enum_variant_size_threshold: u64 = 200),
     /// Lint: VERBOSE_BIT_MASK.
     ///
index 15c27d1a996d74e97abfc58d4f9752405b8f727a..9ba1381da659397d6d500ba7cc1e9fbe6de28198 100644 (file)
@@ -329,7 +329,7 @@ fn multi(&mut self, vec: &[Expr<'_>]) -> Option<Vec<Constant>> {
         vec.iter().map(|elem| self.expr(elem)).collect::<Option<_>>()
     }
 
-    /// Lookup a possibly constant expression from a `ExprKind::Path`.
+    /// Lookup a possibly constant expression from an `ExprKind::Path`.
     fn fetch_path(&mut self, qpath: &QPath<'_>, id: HirId, ty: Ty<'tcx>) -> Option<Constant> {
         let res = self.typeck_results.qpath_res(qpath, id);
         match res {
index 82bfce8fe789ed454ed5dadcc6828967d5443d35..2a13b5ee3474f5f7b7da2c5fb49512c201be6a9f 100644 (file)
@@ -583,7 +583,7 @@ pub fn trait_ref_of_method<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Optio
 /// For example, if `e` represents the `v[0].a.b[x]`
 /// this method will return a tuple, composed of a `Vec`
 /// containing the `Expr`s for `v[0], v[0].a, v[0].a.b, v[0].a.b[x]`
-/// and a `Expr` for root of them, `v`
+/// and an `Expr` for root of them, `v`
 fn projection_stack<'a, 'hir>(mut e: &'a Expr<'hir>) -> (Vec<&'a Expr<'hir>>, &'a Expr<'hir>) {
     let mut result = vec![];
     let root = loop {
index 3b494e1fc8535b3430c0c69fdf88b843c9b015af..65d93e8f86e43f1c7953d83f45721bb9add27c43 100644 (file)
@@ -434,7 +434,7 @@ fn is_shift(op: AssocOp) -> bool {
         matches!(op, AssocOp::ShiftLeft | AssocOp::ShiftRight)
     }
 
-    /// Returns `true` if the operator is a arithmetic operator
+    /// Returns `true` if the operator is an arithmetic operator
     /// (i.e., `+`, `-`, `*`, `/`, `%`).
     fn is_arith(op: AssocOp) -> bool {
         matches!(
index 535147ccc645121259280495102cb985c4905d15..256a336db821d8711c6c3f958e2b814784b2f701 100644 (file)
@@ -117,7 +117,7 @@ impl SelfType for AtomicUsize {
     const WRAPPED_SELF: Option<Self> = Some(AtomicUsize::new(21)); //~ ERROR interior mutable
 }
 
-// Even though a constant contains a generic type, if it also have a interior mutable type,
+// Even though a constant contains a generic type, if it also have an interior mutable type,
 // it should be linted at the definition site.
 trait BothOfCellAndGeneric<T> {
     // this is a false negative in the current implementation.