Skip to content

Commit 0930ac9

Browse files
committed
Fix typos
changelog: none
1 parent eabad8e commit 0930ac9

20 files changed

+22
-22
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ Released 2022-04-07
364364

365365
* [`needless_borrow`]: Prevent mutable borrows being moved and suggest removing the borrow on method calls
366366
[#8217](https://github.com/rust-lang/rust-clippy/pull/8217)
367-
* [`chars_next_cmp`]: Correctly excapes the suggestion
367+
* [`chars_next_cmp`]: Correctly escapes the suggestion
368368
[#8376](https://github.com/rust-lang/rust-clippy/pull/8376)
369369
* [`explicit_write`]: Add suggestions for `write!`s with format arguments
370370
[#8365](https://github.com/rust-lang/rust-clippy/pull/8365)
@@ -2525,7 +2525,7 @@ Released 2019-09-26
25252525
* [`inherent_to_string_shadow_display`] [#4259](https://github.com/rust-lang/rust-clippy/pull/4259)
25262526
* [`type_repetition_in_bounds`] [#3766](https://github.com/rust-lang/rust-clippy/pull/3766)
25272527
* [`try_err`] [#4222](https://github.com/rust-lang/rust-clippy/pull/4222)
2528-
* Move `{unnnecessary,panicking}_unwrap` out of nursery [#4307](https://github.com/rust-lang/rust-clippy/pull/4307)
2528+
* Move `{unnecessary,panicking}_unwrap` out of nursery [#4307](https://github.com/rust-lang/rust-clippy/pull/4307)
25292529
* Extend the `use_self` lint to suggest uses of `Self::Variant` [#4308](https://github.com/rust-lang/rust-clippy/pull/4308)
25302530
* Improve suggestion for needless return [#4262](https://github.com/rust-lang/rust-clippy/pull/4262)
25312531
* Add auto-fixable suggestion for `let_unit` [#4337](https://github.com/rust-lang/rust-clippy/pull/4337)

book/src/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For more information on configuring lint levels, see the [rustc documentation].
5656
Clippy has lint groups which are allow-by-default. This means, that you will
5757
have to enable the lints in those groups manually.
5858

59-
For a full list of all lints with their description and examples, please refere
59+
For a full list of all lints with their description and examples, please refer
6060
to [Clippy's lint list]. The two most important allow-by-default groups are
6161
described below:
6262

clippy_lints/src/borrow_deref_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ declare_clippy_lint! {
2222
/// ```
2323
/// let x = &12;
2424
/// let addr_x = &x as *const _ as usize;
25-
/// let addr_y = &&*x as *const _ as usize; // assert ok now, and lint triggerd.
25+
/// let addr_y = &&*x as *const _ as usize; // assert ok now, and lint triggered.
2626
/// // But if we fix it, assert will fail.
2727
/// assert_ne!(addr_x, addr_y);
2828
/// ```

clippy_lints/src/large_enum_variant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ declare_clippy_lint! {
3030
/// For types that implement `Copy`, the suggestion to `Box` a variant's
3131
/// data would require removing the trait impl. The types can of course
3232
/// still be `Clone`, but that is worse ergonomically. Depending on the
33-
/// use case it may be possible to store the large data in an auxillary
33+
/// use case it may be possible to store the large data in an auxiliary
3434
/// structure (e.g. Arena or ECS).
3535
///
3636
/// The lint will ignore generic types if the layout depends on the

clippy_lints/src/loops/manual_find.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fn last_stmt_and_ret<'tcx>(
139139
if_chain! {
140140
// This should be the loop
141141
if let Some((node_hir, Node::Stmt(..))) = parent_iter.next();
142-
// This should be the funciton body
142+
// This should be the function body
143143
if let Some((_, Node::Block(block))) = parent_iter.next();
144144
if let Some((last_stmt, last_ret)) = extract(block);
145145
if last_stmt.hir_id == node_hir;

clippy_lints/src/matches/match_same_arms.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ impl<'a> NormalizedPat<'a> {
365365
(Self::Slice(pats, None), Self::Slice(front, Some(back)))
366366
| (Self::Slice(front, Some(back)), Self::Slice(pats, None)) => {
367367
// Here `pats` is an exact size match. If the combined lengths of `front` and `back` are greater
368-
// then the minium length required will be greater than the length of `pats`.
368+
// then the minimum length required will be greater than the length of `pats`.
369369
if pats.len() < front.len() + back.len() {
370370
return false;
371371
}

clippy_lints/src/mismatching_type_param_order.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
99
declare_clippy_lint! {
1010
/// ### What it does
1111
/// Checks for type parameters which are positioned inconsistently between
12-
/// a type definition and impl block. Specifically, a paramater in an impl
12+
/// a type definition and impl block. Specifically, a parameter in an impl
1313
/// block which has the same name as a parameter in the type def, but is in
1414
/// a different place.
1515
///

clippy_lints/src/utils/internal_lints/metadata_collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for LintResolver<'a, 'hir> {
10181018
/// This visitor finds the highest applicability value in the visited expressions
10191019
struct ApplicabilityResolver<'a, 'hir> {
10201020
cx: &'a LateContext<'hir>,
1021-
/// This is the index of hightest `Applicability` for `paths::APPLICABILITY_VALUES`
1021+
/// This is the index of highest `Applicability` for `paths::APPLICABILITY_VALUES`
10221022
applicability_index: Option<usize>,
10231023
}
10241024

clippy_utils/src/visitors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Continue for () {
3030
}
3131
}
3232

33-
/// Allows for controlled descent whe using visitor functions. Use `()` instead when always
33+
/// Allows for controlled descent when using visitor functions. Use `()` instead when always
3434
/// descending into child nodes.
3535
#[derive(Clone, Copy)]
3636
pub enum Descend {

tests/ui/if_let_mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn if_let_option() {
2727
};
2828
}
2929

30-
// When mutexs are different don't warn
30+
// When mutexes are different don't warn
3131
fn if_let_different_mutex() {
3232
let m = Mutex::new(Some(0_u8));
3333
let other = Mutex::new(None::<u8>);

tests/ui/inconsistent_struct_constructor.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ mod without_base {
3636
// issue #7069.
3737
new_foo!();
3838

39-
// Shoule NOT lint because the order is the same as in the definition.
39+
// Should NOT lint because the order is the same as in the definition.
4040
Foo { x, y, z };
4141

4242
// Should NOT lint because z is not a shorthand init.

tests/ui/inconsistent_struct_constructor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ mod without_base {
3636
// issue #7069.
3737
new_foo!();
3838

39-
// Shoule NOT lint because the order is the same as in the definition.
39+
// Should NOT lint because the order is the same as in the definition.
4040
Foo { x, y, z };
4141

4242
// Should NOT lint because z is not a shorthand init.

tests/ui/map_flatten_fixable.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn issue8878() {
5858
.and_then(|_| {
5959
// we need some newlines
6060
// so that the span is big enough
61-
// for a splitted output of the diagnostic
61+
// for a split output of the diagnostic
6262
Some("")
6363
// whitespace beforehand is important as well
6464
});

tests/ui/map_flatten_fixable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fn issue8878() {
5959
.map(|_| {
6060
// we need some newlines
6161
// so that the span is big enough
62-
// for a splitted output of the diagnostic
62+
// for a split output of the diagnostic
6363
Some("")
6464
// whitespace beforehand is important as well
6565
})

tests/ui/map_flatten_fixable.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ LL | .map(|_| {
7878
| __________^
7979
LL | | // we need some newlines
8080
LL | | // so that the span is big enough
81-
LL | | // for a splitted output of the diagnostic
81+
LL | | // for a split output of the diagnostic
8282
... |
8383
LL | | })
8484
LL | | .flatten();
@@ -89,7 +89,7 @@ help: try replacing `map` with `and_then` and remove the `.flatten()`
8989
LL ~ .and_then(|_| {
9090
LL + // we need some newlines
9191
LL + // so that the span is big enough
92-
LL + // for a splitted output of the diagnostic
92+
LL + // for a split output of the diagnostic
9393
LL + Some("")
9494
LL + // whitespace beforehand is important as well
9595
LL ~ });

tests/ui/same_name_method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ mod should_lint {
6262
impl T1 for S {}
6363
}
6464

65-
mod mulitply_conflicit_trait {
65+
mod multiply_conflicit_trait {
6666
use crate::{T1, T2};
6767

6868
struct S;

tests/ui/transmutes_expressible_as_ptr_casts.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-rustfix
22
#![warn(clippy::transmutes_expressible_as_ptr_casts)]
3-
// These two warnings currrently cover the cases transmutes_expressible_as_ptr_casts
3+
// These two warnings currently cover the cases transmutes_expressible_as_ptr_casts
44
// would otherwise be responsible for
55
#![warn(clippy::useless_transmute)]
66
#![warn(clippy::transmute_ptr_to_ptr)]

tests/ui/transmutes_expressible_as_ptr_casts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// run-rustfix
22
#![warn(clippy::transmutes_expressible_as_ptr_casts)]
3-
// These two warnings currrently cover the cases transmutes_expressible_as_ptr_casts
3+
// These two warnings currently cover the cases transmutes_expressible_as_ptr_casts
44
// would otherwise be responsible for
55
#![warn(clippy::useless_transmute)]
66
#![warn(clippy::transmute_ptr_to_ptr)]

tests/ui/wildcard_imports.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ mod super_imports {
199199
}
200200
}
201201

202-
mod should_be_replaced_futher_inside {
202+
mod should_be_replaced_further_inside {
203203
fn insidefoo() {}
204204
mod inner {
205205
use super::insidefoo;

tests/ui/wildcard_imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ mod super_imports {
200200
}
201201
}
202202

203-
mod should_be_replaced_futher_inside {
203+
mod should_be_replaced_further_inside {
204204
fn insidefoo() {}
205205
mod inner {
206206
use super::*;

0 commit comments

Comments
 (0)