Auto merge of #5810 - matthiaskrgr:typos_2, r=Manishearth

fix typos (found by codespell)

changelog: none
This commit is contained in:
bors 2020-07-17 02:08:22 +00:00
commit 82c8f25efa
15 changed files with 15 additions and 15 deletions

View File

@ -153,7 +153,7 @@ macro_rules! declare_deprecated_lint {
///
/// **Deprecation reason:** Associated-constants are now preferred.
pub REPLACE_CONSTS,
"associated-constants `MIN`/`MAX` of integers are prefered to `{min,max}_value()` and module constants"
"associated-constants `MIN`/`MAX` of integers are preferred to `{min,max}_value()` and module constants"
}
declare_deprecated_lint! {

View File

@ -10,7 +10,7 @@
declare_clippy_lint! {
/// **What it does:** Checks for explicit `deref()` or `deref_mut()` method calls.
///
/// **Why is this bad?** Derefencing by `&*x` or `&mut *x` is clearer and more concise,
/// **Why is this bad?** Dereferencing by `&*x` or `&mut *x` is clearer and more concise,
/// when not part of a method chain.
///
/// **Example:**

View File

@ -55,7 +55,7 @@ fn check_item(&mut self, _: &LateContext<'tcx>, item: &'tcx Item<'_>) {
..
} = item.kind
{
// Remember for each inherent implementation encoutered its span and generics
// Remember for each inherent implementation encountered its span and generics
// but filter out implementations that have generic params (type or lifetime)
// or are derived from a macro
if !in_macro(item.span) && generics.params.is_empty() {

View File

@ -463,7 +463,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
);
store.register_removed(
"clippy::replace_consts",
"associated-constants `MIN`/`MAX` of integers are prefered to `{min,max}_value()` and module constants",
"associated-constants `MIN`/`MAX` of integers are preferred to `{min,max}_value()` and module constants",
);
store.register_removed(
"clippy::regex_macro",

View File

@ -131,7 +131,7 @@ fn check_fn(
/// Returns true if any of the method parameters is a type that implements `Drop`. The method
/// can't be made const then, because `drop` can't be const-evaluated.
fn method_accepts_dropable(cx: &LateContext<'_>, param_tys: &[hir::Ty<'_>]) -> bool {
// If any of the params are dropable, return true
// If any of the params are droppable, return true
param_tys.iter().any(|hir_ty| {
let ty_ty = hir_ty_to_ty(cx.tcx, hir_ty);
has_drop(cx, ty_ty)

View File

@ -8,7 +8,7 @@
use std::fmt::Display;
declare_clippy_lint! {
/// **What it does:** Checks for modulo arithemtic.
/// **What it does:** Checks for modulo arithmetic.
///
/// **Why is this bad?** The results of modulo (%) operation might differ
/// depending on the language, when negative numbers are involved.

View File

@ -78,7 +78,7 @@ fn is_result_ok(cx: &LateContext<'_>, expr: &'_ Expr<'_>) -> bool {
}
}
/// A struct containing information about occurences of the
/// A struct containing information about occurrences of the
/// `if let Some(..) = .. else` construct that this lint detects.
struct OptionIfLetElseOccurence {
option: String,

View File

@ -36,7 +36,7 @@ pub struct NumericLiteral<'a> {
pub integer: &'a str,
/// The fraction part of the number.
pub fraction: Option<&'a str>,
/// The character used as exponent seperator (b'e' or b'E') and the exponent part.
/// The character used as exponent separator (b'e' or b'E') and the exponent part.
pub exponent: Option<(char, &'a str)>,
/// The type suffix, including preceding underscore if present.

View File

@ -30,7 +30,7 @@ async fn already_async() -> impl Future<Output = i32> {
struct S {}
impl S {
async fn inh_fut() -> i32 {
// NOTE: this code is here just to check that the identation is correct in the suggested fix
// NOTE: this code is here just to check that the indentation is correct in the suggested fix
let a = 42;
let b = 21;
if a < b {

View File

@ -37,7 +37,7 @@ struct S {}
impl S {
fn inh_fut() -> impl Future<Output = i32> {
async {
// NOTE: this code is here just to check that the identation is correct in the suggested fix
// NOTE: this code is here just to check that the indentation is correct in the suggested fix
let a = 42;
let b = 21;
if a < b {

View File

@ -57,7 +57,7 @@ LL | async fn inh_fut() -> i32 {
help: move the body of the async block to the enclosing function
|
LL | fn inh_fut() -> impl Future<Output = i32> {
LL | // NOTE: this code is here just to check that the identation is correct in the suggested fix
LL | // NOTE: this code is here just to check that the indentation is correct in the suggested fix
LL | let a = 42;
LL | let b = 21;
LL | if a < b {

View File

@ -166,7 +166,7 @@ pub fn test14() {
}
}
// Issue #1991: the outter loop should not warn.
// Issue #1991: the outer loop should not warn.
pub fn test15() {
'label: loop {
while false {

View File

@ -32,7 +32,7 @@ fn main() {
let _ = -(1i32.abs());
let _ = -(1f32.abs());
// Odd functions shoud not trigger an error
// Odd functions should not trigger an error
let _ = -1f64.asin();
let _ = -1f64.asinh();
let _ = -1f64.atan();

View File

@ -32,7 +32,7 @@ fn main() {
let _ = -(1i32.abs());
let _ = -(1f32.abs());
// Odd functions shoud not trigger an error
// Odd functions should not trigger an error
let _ = -1f64.asin();
let _ = -1f64.asinh();
let _ = -1f64.atan();

View File

@ -7,7 +7,7 @@ fn main() {
// not applicable
vec![1, 2, 3, 4, 5].resize(2, 5);
// applicable here, but only implemented for integer litterals for now
// applicable here, but only implemented for integer literals for now
vec!["foo", "bar", "baz"].resize(0, "bar");
// not applicable