Auto merge of #9159 - alex-semenyuk:fix_typos, r=dswij

Fix typos

changelog: none
This commit is contained in:
bors 2022-07-13 14:48:32 +00:00
commit 0db9280783
20 changed files with 22 additions and 22 deletions

View file

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

View file

@ -56,7 +56,7 @@ For more information on configuring lint levels, see the [rustc documentation].
Clippy has lint groups which are allow-by-default. This means, that you will
have to enable the lints in those groups manually.
For a full list of all lints with their description and examples, please refere
For a full list of all lints with their description and examples, please refer
to [Clippy's lint list]. The two most important allow-by-default groups are
described below:

View file

@ -22,7 +22,7 @@ declare_clippy_lint! {
/// ```
/// let x = &12;
/// let addr_x = &x as *const _ as usize;
/// let addr_y = &&*x as *const _ as usize; // assert ok now, and lint triggerd.
/// let addr_y = &&*x as *const _ as usize; // assert ok now, and lint triggered.
/// // But if we fix it, assert will fail.
/// assert_ne!(addr_x, addr_y);
/// ```

View file

@ -30,7 +30,7 @@ declare_clippy_lint! {
/// For types that implement `Copy`, the suggestion to `Box` a variant's
/// data would require removing the trait impl. The types can of course
/// still be `Clone`, but that is worse ergonomically. Depending on the
/// use case it may be possible to store the large data in an auxillary
/// use case it may be possible to store the large data in an auxiliary
/// structure (e.g. Arena or ECS).
///
/// The lint will ignore generic types if the layout depends on the

View file

@ -139,7 +139,7 @@ fn last_stmt_and_ret<'tcx>(
if_chain! {
// This should be the loop
if let Some((node_hir, Node::Stmt(..))) = parent_iter.next();
// This should be the funciton body
// This should be the function body
if let Some((_, Node::Block(block))) = parent_iter.next();
if let Some((last_stmt, last_ret)) = extract(block);
if last_stmt.hir_id == node_hir;

View file

@ -365,7 +365,7 @@ impl<'a> NormalizedPat<'a> {
(Self::Slice(pats, None), Self::Slice(front, Some(back)))
| (Self::Slice(front, Some(back)), Self::Slice(pats, None)) => {
// Here `pats` is an exact size match. If the combined lengths of `front` and `back` are greater
// then the minium length required will be greater than the length of `pats`.
// then the minimum length required will be greater than the length of `pats`.
if pats.len() < front.len() + back.len() {
return false;
}

View file

@ -9,7 +9,7 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
declare_clippy_lint! {
/// ### What it does
/// Checks for type parameters which are positioned inconsistently between
/// a type definition and impl block. Specifically, a paramater in an impl
/// a type definition and impl block. Specifically, a parameter in an impl
/// block which has the same name as a parameter in the type def, but is in
/// a different place.
///

View file

@ -1018,7 +1018,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for LintResolver<'a, 'hir> {
/// This visitor finds the highest applicability value in the visited expressions
struct ApplicabilityResolver<'a, 'hir> {
cx: &'a LateContext<'hir>,
/// This is the index of hightest `Applicability` for `paths::APPLICABILITY_VALUES`
/// This is the index of highest `Applicability` for `paths::APPLICABILITY_VALUES`
applicability_index: Option<usize>,
}

View file

@ -30,7 +30,7 @@ impl Continue for () {
}
}
/// Allows for controlled descent whe using visitor functions. Use `()` instead when always
/// Allows for controlled descent when using visitor functions. Use `()` instead when always
/// descending into child nodes.
#[derive(Clone, Copy)]
pub enum Descend {

View file

@ -27,7 +27,7 @@ fn if_let_option() {
};
}
// When mutexs are different don't warn
// When mutexes are different don't warn
fn if_let_different_mutex() {
let m = Mutex::new(Some(0_u8));
let other = Mutex::new(None::<u8>);

View file

@ -36,7 +36,7 @@ mod without_base {
// issue #7069.
new_foo!();
// Shoule NOT lint because the order is the same as in the definition.
// Should NOT lint because the order is the same as in the definition.
Foo { x, y, z };
// Should NOT lint because z is not a shorthand init.

View file

@ -36,7 +36,7 @@ mod without_base {
// issue #7069.
new_foo!();
// Shoule NOT lint because the order is the same as in the definition.
// Should NOT lint because the order is the same as in the definition.
Foo { x, y, z };
// Should NOT lint because z is not a shorthand init.

View file

@ -58,7 +58,7 @@ fn issue8878() {
.and_then(|_| {
// we need some newlines
// so that the span is big enough
// for a splitted output of the diagnostic
// for a split output of the diagnostic
Some("")
// whitespace beforehand is important as well
});

View file

@ -59,7 +59,7 @@ fn issue8878() {
.map(|_| {
// we need some newlines
// so that the span is big enough
// for a splitted output of the diagnostic
// for a split output of the diagnostic
Some("")
// whitespace beforehand is important as well
})

View file

@ -78,7 +78,7 @@ LL | .map(|_| {
| __________^
LL | | // we need some newlines
LL | | // so that the span is big enough
LL | | // for a splitted output of the diagnostic
LL | | // for a split output of the diagnostic
... |
LL | | })
LL | | .flatten();
@ -89,7 +89,7 @@ help: try replacing `map` with `and_then` and remove the `.flatten()`
LL ~ .and_then(|_| {
LL + // we need some newlines
LL + // so that the span is big enough
LL + // for a splitted output of the diagnostic
LL + // for a split output of the diagnostic
LL + Some("")
LL + // whitespace beforehand is important as well
LL ~ });

View file

@ -62,7 +62,7 @@ mod should_lint {
impl T1 for S {}
}
mod mulitply_conflicit_trait {
mod multiply_conflicit_trait {
use crate::{T1, T2};
struct S;

View file

@ -1,6 +1,6 @@
// run-rustfix
#![warn(clippy::transmutes_expressible_as_ptr_casts)]
// These two warnings currrently cover the cases transmutes_expressible_as_ptr_casts
// These two warnings currently cover the cases transmutes_expressible_as_ptr_casts
// would otherwise be responsible for
#![warn(clippy::useless_transmute)]
#![warn(clippy::transmute_ptr_to_ptr)]

View file

@ -1,6 +1,6 @@
// run-rustfix
#![warn(clippy::transmutes_expressible_as_ptr_casts)]
// These two warnings currrently cover the cases transmutes_expressible_as_ptr_casts
// These two warnings currently cover the cases transmutes_expressible_as_ptr_casts
// would otherwise be responsible for
#![warn(clippy::useless_transmute)]
#![warn(clippy::transmute_ptr_to_ptr)]

View file

@ -199,7 +199,7 @@ mod super_imports {
}
}
mod should_be_replaced_futher_inside {
mod should_be_replaced_further_inside {
fn insidefoo() {}
mod inner {
use super::insidefoo;

View file

@ -200,7 +200,7 @@ mod super_imports {
}
}
mod should_be_replaced_futher_inside {
mod should_be_replaced_further_inside {
fn insidefoo() {}
mod inner {
use super::*;