Skip to content

Commit c860718

Browse files
committed
Fix typos “a”→“an”
1 parent 5fec618 commit c860718

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

clippy_lints/src/loops/manual_memcpy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ impl std::ops::Sub<&MinifyingSugg<'static>> for MinifyingSugg<'static> {
268268
}
269269
}
270270

271-
/// a wrapper around `MinifyingSugg`, which carries a operator like currying
271+
/// a wrapper around `MinifyingSugg`, which carries an operator like currying
272272
/// so that the suggested code become more efficient (e.g. `foo + -bar` `foo - bar`).
273273
struct Offset {
274274
value: MinifyingSugg<'static>,

clippy_lints/src/non_copy_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl<'tcx> LateLintPass<'tcx> for NonCopyConst {
293293
}) => {
294294
if_chain! {
295295
// Lint a trait impl item only when the definition is a generic type,
296-
// assuming a assoc const is not meant to be a interior mutable type.
296+
// assuming an assoc const is not meant to be an interior mutable type.
297297
if let Some(of_trait_def_id) = of_trait_ref.trait_def_id();
298298
if let Some(of_assoc_item) = specialization_graph::Node::Trait(of_trait_def_id)
299299
.item(cx.tcx, impl_item.ident, AssocKind::Const, of_trait_def_id);

clippy_lints/src/ranges.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ declare_clippy_lint! {
5151
///
5252
/// ### Known problems
5353
/// Will add unnecessary pair of parentheses when the
54-
/// expression is not wrapped in a pair but starts with a opening parenthesis
54+
/// expression is not wrapped in a pair but starts with an opening parenthesis
5555
/// and ends with a closing one.
5656
/// I.e., `let _ = (f()+1)..(f()+1)` results in `let _ = ((f()+1)..=f())`.
5757
///

clippy_lints/src/shadow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ declare_clippy_lint! {
7474
declare_clippy_lint! {
7575
/// ### What it does
7676
/// Checks for bindings that shadow other bindings already in
77-
/// scope, either without a initialization or with one that does not even use
77+
/// scope, either without an initialization or with one that does not even use
7878
/// the original value.
7979
///
8080
/// ### Why is this bad?

clippy_lints/src/utils/conf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ define_Conf! {
198198
(enum_variant_name_threshold: u64 = 3),
199199
/// Lint: LARGE_ENUM_VARIANT.
200200
///
201-
/// The maximum size of a enum's variant to avoid box suggestion
201+
/// The maximum size of an enum's variant to avoid box suggestion
202202
(enum_variant_size_threshold: u64 = 200),
203203
/// Lint: VERBOSE_BIT_MASK.
204204
///

clippy_utils/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> {
329329
vec.iter().map(|elem| self.expr(elem)).collect::<Option<_>>()
330330
}
331331

332-
/// Lookup a possibly constant expression from a `ExprKind::Path`.
332+
/// Lookup a possibly constant expression from an `ExprKind::Path`.
333333
fn fetch_path(&mut self, qpath: &QPath<'_>, id: HirId, ty: Ty<'tcx>) -> Option<Constant> {
334334
let res = self.typeck_results.qpath_res(qpath, id);
335335
match res {

clippy_utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ pub fn trait_ref_of_method<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Optio
583583
/// For example, if `e` represents the `v[0].a.b[x]`
584584
/// this method will return a tuple, composed of a `Vec`
585585
/// containing the `Expr`s for `v[0], v[0].a, v[0].a.b, v[0].a.b[x]`
586-
/// and a `Expr` for root of them, `v`
586+
/// and an `Expr` for root of them, `v`
587587
fn projection_stack<'a, 'hir>(mut e: &'a Expr<'hir>) -> (Vec<&'a Expr<'hir>>, &'a Expr<'hir>) {
588588
let mut result = vec![];
589589
let root = loop {

clippy_utils/src/sugg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ pub fn make_assoc(op: AssocOp, lhs: &Sugg<'_>, rhs: &Sugg<'_>) -> Sugg<'static>
434434
matches!(op, AssocOp::ShiftLeft | AssocOp::ShiftRight)
435435
}
436436

437-
/// Returns `true` if the operator is a arithmetic operator
437+
/// Returns `true` if the operator is an arithmetic operator
438438
/// (i.e., `+`, `-`, `*`, `/`, `%`).
439439
fn is_arith(op: AssocOp) -> bool {
440440
matches!(

tests/ui/declare_interior_mutable_const/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl SelfType for AtomicUsize {
117117
const WRAPPED_SELF: Option<Self> = Some(AtomicUsize::new(21)); //~ ERROR interior mutable
118118
}
119119

120-
// Even though a constant contains a generic type, if it also have a interior mutable type,
120+
// Even though a constant contains a generic type, if it also have an interior mutable type,
121121
// it should be linted at the definition site.
122122
trait BothOfCellAndGeneric<T> {
123123
// this is a false negative in the current implementation.

0 commit comments

Comments
 (0)