about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/static/js/search.js2
-rw-r--r--src/test/incremental/thinlto/cgu_invalidated_when_import_removed.rs2
-rw-r--r--src/test/rustdoc-ui/coverage/allow_missing_docs.rs2
-rw-r--r--src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs2
-rw-r--r--src/test/ui/async-await/issues/issue-69307.rs2
-rw-r--r--src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed2
-rw-r--r--src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs2
-rw-r--r--src/test/ui/hrtb/hrtb-exists-forall-fn.rs2
-rw-r--r--src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.rs2
-rw-r--r--src/test/ui/rfc-2008-non-exhaustive/enum.rs2
-rw-r--r--src/test/ui/traits/reservation-impl/non-lattice-ok.rs4
-rw-r--r--src/test/ui/union/union-nonzero.rs2
-rw-r--r--src/tools/clippy/clippy_lints/src/loops/manual_memcpy.rs2
-rw-r--r--src/tools/clippy/clippy_lints/src/non_copy_const.rs2
-rw-r--r--src/tools/clippy/clippy_lints/src/ranges.rs2
-rw-r--r--src/tools/clippy/clippy_lints/src/shadow.rs2
-rw-r--r--src/tools/clippy/clippy_lints/src/utils/conf.rs2
-rw-r--r--src/tools/clippy/clippy_utils/src/consts.rs2
-rw-r--r--src/tools/clippy/clippy_utils/src/lib.rs2
-rw-r--r--src/tools/clippy/clippy_utils/src/sugg.rs2
-rw-r--r--src/tools/clippy/tests/ui/declare_interior_mutable_const/traits.rs2
-rw-r--r--src/tools/compiletest/src/runtest.rs2
22 files changed, 23 insertions, 23 deletions
diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js
index 76e7295bce3..5eb545f7582 100644
--- a/src/librustdoc/html/static/js/search.js
+++ b/src/librustdoc/html/static/js/search.js
@@ -1331,7 +1331,7 @@ window.initSearch = function(rawSearchIndex) {
             // an array of [(Number) item type,
             //              (String) name]
             var paths = rawSearchIndex[crate].p;
-            // a array of [(String) alias name
+            // an array of [(String) alias name
             //             [Number] index to items]
             var aliases = rawSearchIndex[crate].a;
 
diff --git a/src/test/incremental/thinlto/cgu_invalidated_when_import_removed.rs b/src/test/incremental/thinlto/cgu_invalidated_when_import_removed.rs
index 1214e37f982..fc53acf75cb 100644
--- a/src/test/incremental/thinlto/cgu_invalidated_when_import_removed.rs
+++ b/src/test/incremental/thinlto/cgu_invalidated_when_import_removed.rs
@@ -8,7 +8,7 @@
 // functions and the modules are enclosed in `[]`)
 //
 // In our specific instance, the earlier compilations were inlining the call
-// to`B` into `A`; thus `A` ended up with a external reference to the symbol `D`
+// to`B` into `A`; thus `A` ended up with an external reference to the symbol `D`
 // in its object code, to be resolved at subsequent link time. The LTO import
 // information provided by LLVM for those runs reflected that information: it
 // explicitly says during those runs, `B` definition and `D` declaration were
diff --git a/src/test/rustdoc-ui/coverage/allow_missing_docs.rs b/src/test/rustdoc-ui/coverage/allow_missing_docs.rs
index c077be31b20..c771c09da88 100644
--- a/src/test/rustdoc-ui/coverage/allow_missing_docs.rs
+++ b/src/test/rustdoc-ui/coverage/allow_missing_docs.rs
@@ -8,7 +8,7 @@ pub mod mod_foo {
     pub struct Bar;
 }
 
-/// This is a struct with a `#[allow(missing_docs)]`
+/// This is a struct with an `#[allow(missing_docs)]`
 pub struct AllowTheMissingDocs {
     #[allow(missing_docs)]
     pub empty_str: String,
diff --git a/src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs b/src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs
index 4ec43708584..edfecb91036 100644
--- a/src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs
+++ b/src/test/ui/async-await/drop-order/drop-order-for-temporary-in-tail-return-expr.rs
@@ -10,7 +10,7 @@
 // Test the drop order for parameters relative to local variables and
 // temporaries created in the tail return expression of the function
 // body. In particular, check that this drop order is the same between
-// a `async fn` and an ordinary `fn`. See #64512.
+// an `async fn` and an ordinary `fn`. See #64512.
 
 extern crate arc_wake;
 
diff --git a/src/test/ui/async-await/issues/issue-69307.rs b/src/test/ui/async-await/issues/issue-69307.rs
index 4dae96ec8a6..59309a7f288 100644
--- a/src/test/ui/async-await/issues/issue-69307.rs
+++ b/src/test/ui/async-await/issues/issue-69307.rs
@@ -1,6 +1,6 @@
 // Regression test for #69307
 //
-// Having a `async { .. foo.await .. }` block appear inside of a `+=`
+// Having an `async { .. foo.await .. }` block appear inside of a `+=`
 // expression was causing an ICE due to a failure to save/restore
 // state in the AST numbering pass when entering a nested body.
 //
diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed
index 982407e2e25..c82bc369f43 100644
--- a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed
+++ b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.fixed
@@ -3,7 +3,7 @@
 #![deny(rust_2021_incompatible_closure_captures)]
 //~^ NOTE: the lint level is defined here
 
-// Test cases for types that implement a insignificant drop (stlib defined)
+// Test cases for types that implement an insignificant drop (stlib defined)
 
 // `t` needs Drop because one of its elements needs drop,
 // therefore precise capture might affect drop ordering
diff --git a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs
index 1ac034959cb..57ab15ae8f2 100644
--- a/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs
+++ b/src/test/ui/closures/2229_closure_analysis/migrations/insignificant_drop.rs
@@ -3,7 +3,7 @@
 #![deny(rust_2021_incompatible_closure_captures)]
 //~^ NOTE: the lint level is defined here
 
-// Test cases for types that implement a insignificant drop (stlib defined)
+// Test cases for types that implement an insignificant drop (stlib defined)
 
 // `t` needs Drop because one of its elements needs drop,
 // therefore precise capture might affect drop ordering
diff --git a/src/test/ui/hrtb/hrtb-exists-forall-fn.rs b/src/test/ui/hrtb/hrtb-exists-forall-fn.rs
index 828331cb950..56780237618 100644
--- a/src/test/ui/hrtb/hrtb-exists-forall-fn.rs
+++ b/src/test/ui/hrtb/hrtb-exists-forall-fn.rs
@@ -1,4 +1,4 @@
-// Test a `exists<'a> { forall<'b> { 'a = 'b } }` pattern -- which should not compile!
+// Test an `exists<'a> { forall<'b> { 'a = 'b } }` pattern -- which should not compile!
 //
 // In particular, we test this pattern in trait solving, where it is not connected
 // to any part of the source code.
diff --git a/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.rs b/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.rs
index b1b7ec6bcf1..9b9e4496a87 100644
--- a/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.rs
+++ b/src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.rs
@@ -1,4 +1,4 @@
-// Test a `exists<'a> { forall<'b> { 'a = 'b } }` pattern -- which should not compile!
+// Test an `exists<'a> { forall<'b> { 'a = 'b } }` pattern -- which should not compile!
 //
 // In particular, we test this pattern in trait solving, where it is not connected
 // to any part of the source code.
diff --git a/src/test/ui/rfc-2008-non-exhaustive/enum.rs b/src/test/ui/rfc-2008-non-exhaustive/enum.rs
index 73e0b98296b..9d2855f5c61 100644
--- a/src/test/ui/rfc-2008-non-exhaustive/enum.rs
+++ b/src/test/ui/rfc-2008-non-exhaustive/enum.rs
@@ -30,7 +30,7 @@ fn main() {
     match enum_unit {
         NonExhaustiveEnum::Unit => 1,
         NonExhaustiveEnum::Tuple(_) => 2,
-        // This particular arm tests that a enum marked as non-exhaustive
+        // This particular arm tests that an enum marked as non-exhaustive
         // will not error if its variants are matched exhaustively.
         NonExhaustiveEnum::Struct { field } => field,
         _ => 0 // no error with wildcard
diff --git a/src/test/ui/traits/reservation-impl/non-lattice-ok.rs b/src/test/ui/traits/reservation-impl/non-lattice-ok.rs
index b894577c1f7..a71051243c8 100644
--- a/src/test/ui/traits/reservation-impl/non-lattice-ok.rs
+++ b/src/test/ui/traits/reservation-impl/non-lattice-ok.rs
@@ -5,7 +5,7 @@
 
 // Why did we ever want to do this?
 //
-// We want to eventually add a `impl<T> From<!> for T` impl. That impl conflicts
+// We want to eventually add an `impl<T> From<!> for T` impl. That impl conflicts
 // with existing impls - at least the `impl<T> From<T> for T` impl. There are
 // 2 ways we thought of for dealing with that conflict:
 //
@@ -23,7 +23,7 @@
 // actually cause any ambiguity.
 //
 // Now it turned out lattice specialization doesn't work it, because an
-// `impl<T> From<T> for Smaht<T>` would require a `impl From<!> for Smaht<!>`,
+// `impl<T> From<T> for Smaht<T>` would require an `impl From<!> for Smaht<!>`,
 // breaking backwards-compatibility in a fairly painful way. So if we want to
 // go with a known approach, we should go with a "marker trait overlap"-style
 // approach.
diff --git a/src/test/ui/union/union-nonzero.rs b/src/test/ui/union/union-nonzero.rs
index d29e7a97180..3f4f7ea1c10 100644
--- a/src/test/ui/union/union-nonzero.rs
+++ b/src/test/ui/union/union-nonzero.rs
@@ -13,7 +13,7 @@
 // optimizations to types containing unions even if they're theoretically possible. (discussion:
 // https://github.com/rust-lang/rust/issues/36394)
 //
-// Notably this nails down part of the behavior that `MaybeUninit` assumes: that a
+// Notably this nails down part of the behavior that `MaybeUninit` assumes: that an
 // `Option<MaybeUninit<&u8>>` does not take advantage of non-zero optimization, and thus is a safe
 // construct.
 
diff --git a/src/tools/clippy/clippy_lints/src/loops/manual_memcpy.rs b/src/tools/clippy/clippy_lints/src/loops/manual_memcpy.rs
index 2525b14e1c5..2296842e86f 100644
--- a/src/tools/clippy/clippy_lints/src/loops/manual_memcpy.rs
+++ b/src/tools/clippy/clippy_lints/src/loops/manual_memcpy.rs
@@ -268,7 +268,7 @@ impl std::ops::Sub<&MinifyingSugg<'static>> for 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>,
diff --git a/src/tools/clippy/clippy_lints/src/non_copy_const.rs b/src/tools/clippy/clippy_lints/src/non_copy_const.rs
index aa3067876eb..6c2563358ca 100644
--- a/src/tools/clippy/clippy_lints/src/non_copy_const.rs
+++ b/src/tools/clippy/clippy_lints/src/non_copy_const.rs
@@ -293,7 +293,7 @@ impl<'tcx> LateLintPass<'tcx> for NonCopyConst {
                 }) => {
                     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);
diff --git a/src/tools/clippy/clippy_lints/src/ranges.rs b/src/tools/clippy/clippy_lints/src/ranges.rs
index 0114a2f97a2..4fa361fedaf 100644
--- a/src/tools/clippy/clippy_lints/src/ranges.rs
+++ b/src/tools/clippy/clippy_lints/src/ranges.rs
@@ -51,7 +51,7 @@ declare_clippy_lint! {
     ///
     /// ### 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())`.
     ///
diff --git a/src/tools/clippy/clippy_lints/src/shadow.rs b/src/tools/clippy/clippy_lints/src/shadow.rs
index b28a37cabd4..b9e317a3cfd 100644
--- a/src/tools/clippy/clippy_lints/src/shadow.rs
+++ b/src/tools/clippy/clippy_lints/src/shadow.rs
@@ -74,7 +74,7 @@ declare_clippy_lint! {
 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?
diff --git a/src/tools/clippy/clippy_lints/src/utils/conf.rs b/src/tools/clippy/clippy_lints/src/utils/conf.rs
index a28b1d78f7d..c192f9094a8 100644
--- a/src/tools/clippy/clippy_lints/src/utils/conf.rs
+++ b/src/tools/clippy/clippy_lints/src/utils/conf.rs
@@ -198,7 +198,7 @@ define_Conf! {
     (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.
     ///
diff --git a/src/tools/clippy/clippy_utils/src/consts.rs b/src/tools/clippy/clippy_utils/src/consts.rs
index 15c27d1a996..9ba1381da65 100644
--- a/src/tools/clippy/clippy_utils/src/consts.rs
+++ b/src/tools/clippy/clippy_utils/src/consts.rs
@@ -329,7 +329,7 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> {
         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 {
diff --git a/src/tools/clippy/clippy_utils/src/lib.rs b/src/tools/clippy/clippy_utils/src/lib.rs
index 82bfce8fe78..2a13b5ee347 100644
--- a/src/tools/clippy/clippy_utils/src/lib.rs
+++ b/src/tools/clippy/clippy_utils/src/lib.rs
@@ -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 {
diff --git a/src/tools/clippy/clippy_utils/src/sugg.rs b/src/tools/clippy/clippy_utils/src/sugg.rs
index 3b494e1fc85..65d93e8f86e 100644
--- a/src/tools/clippy/clippy_utils/src/sugg.rs
+++ b/src/tools/clippy/clippy_utils/src/sugg.rs
@@ -434,7 +434,7 @@ pub fn make_assoc(op: AssocOp, lhs: &Sugg<'_>, rhs: &Sugg<'_>) -> Sugg<'static>
         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!(
diff --git a/src/tools/clippy/tests/ui/declare_interior_mutable_const/traits.rs b/src/tools/clippy/tests/ui/declare_interior_mutable_const/traits.rs
index 535147ccc64..256a336db82 100644
--- a/src/tools/clippy/tests/ui/declare_interior_mutable_const/traits.rs
+++ b/src/tools/clippy/tests/ui/declare_interior_mutable_const/traits.rs
@@ -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.
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index dee1d315b3d..f291918225f 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1733,7 +1733,7 @@ impl<'test> TestCx<'test> {
     }
 
     /// For each `aux-build: foo/bar` annotation, we check to find the
-    /// file in a `auxiliary` directory relative to the test itself.
+    /// file in an `auxiliary` directory relative to the test itself.
     fn compute_aux_test_paths(&self, rel_ab: &str) -> TestPaths {
         let test_ab = self
             .testpaths