Skip to content

Commit 82c8f25

Browse files
committed
Auto merge of rust-lang#5810 - matthiaskrgr:typos_2, r=Manishearth
fix typos (found by codespell) changelog: none
2 parents c2cb565 + 3618b97 commit 82c8f25

15 files changed

+15
-15
lines changed

clippy_lints/src/deprecated_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ declare_deprecated_lint! {
153153
///
154154
/// **Deprecation reason:** Associated-constants are now preferred.
155155
pub REPLACE_CONSTS,
156-
"associated-constants `MIN`/`MAX` of integers are prefered to `{min,max}_value()` and module constants"
156+
"associated-constants `MIN`/`MAX` of integers are preferred to `{min,max}_value()` and module constants"
157157
}
158158

159159
declare_deprecated_lint! {

clippy_lints/src/dereference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_span::source_map::Span;
1010
declare_clippy_lint! {
1111
/// **What it does:** Checks for explicit `deref()` or `deref_mut()` method calls.
1212
///
13-
/// **Why is this bad?** Derefencing by `&*x` or `&mut *x` is clearer and more concise,
13+
/// **Why is this bad?** Dereferencing by `&*x` or `&mut *x` is clearer and more concise,
1414
/// when not part of a method chain.
1515
///
1616
/// **Example:**

clippy_lints/src/inherent_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl<'tcx> LateLintPass<'tcx> for MultipleInherentImpl {
5555
..
5656
} = item.kind
5757
{
58-
// Remember for each inherent implementation encoutered its span and generics
58+
// Remember for each inherent implementation encountered its span and generics
5959
// but filter out implementations that have generic params (type or lifetime)
6060
// or are derived from a macro
6161
if !in_macro(item.span) && generics.params.is_empty() {

clippy_lints/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
463463
);
464464
store.register_removed(
465465
"clippy::replace_consts",
466-
"associated-constants `MIN`/`MAX` of integers are prefered to `{min,max}_value()` and module constants",
466+
"associated-constants `MIN`/`MAX` of integers are preferred to `{min,max}_value()` and module constants",
467467
);
468468
store.register_removed(
469469
"clippy::regex_macro",

clippy_lints/src/missing_const_for_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingConstForFn {
131131
/// Returns true if any of the method parameters is a type that implements `Drop`. The method
132132
/// can't be made const then, because `drop` can't be const-evaluated.
133133
fn method_accepts_dropable(cx: &LateContext<'_>, param_tys: &[hir::Ty<'_>]) -> bool {
134-
// If any of the params are dropable, return true
134+
// If any of the params are droppable, return true
135135
param_tys.iter().any(|hir_ty| {
136136
let ty_ty = hir_ty_to_ty(cx.tcx, hir_ty);
137137
has_drop(cx, ty_ty)

clippy_lints/src/modulo_arithmetic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};
88
use std::fmt::Display;
99

1010
declare_clippy_lint! {
11-
/// **What it does:** Checks for modulo arithemtic.
11+
/// **What it does:** Checks for modulo arithmetic.
1212
///
1313
/// **Why is this bad?** The results of modulo (%) operation might differ
1414
/// depending on the language, when negative numbers are involved.

clippy_lints/src/option_if_let_else.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn is_result_ok(cx: &LateContext<'_>, expr: &'_ Expr<'_>) -> bool {
7878
}
7979
}
8080

81-
/// A struct containing information about occurences of the
81+
/// A struct containing information about occurrences of the
8282
/// `if let Some(..) = .. else` construct that this lint detects.
8383
struct OptionIfLetElseOccurence {
8484
option: String,

clippy_lints/src/utils/numeric_literal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub struct NumericLiteral<'a> {
3636
pub integer: &'a str,
3737
/// The fraction part of the number.
3838
pub fraction: Option<&'a str>,
39-
/// The character used as exponent seperator (b'e' or b'E') and the exponent part.
39+
/// The character used as exponent separator (b'e' or b'E') and the exponent part.
4040
pub exponent: Option<(char, &'a str)>,
4141

4242
/// The type suffix, including preceding underscore if present.

tests/ui/manual_async_fn.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async fn already_async() -> impl Future<Output = i32> {
3030
struct S {}
3131
impl S {
3232
async fn inh_fut() -> i32 {
33-
// NOTE: this code is here just to check that the identation is correct in the suggested fix
33+
// NOTE: this code is here just to check that the indentation is correct in the suggested fix
3434
let a = 42;
3535
let b = 21;
3636
if a < b {

tests/ui/manual_async_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct S {}
3737
impl S {
3838
fn inh_fut() -> impl Future<Output = i32> {
3939
async {
40-
// NOTE: this code is here just to check that the identation is correct in the suggested fix
40+
// NOTE: this code is here just to check that the indentation is correct in the suggested fix
4141
let a = 42;
4242
let b = 21;
4343
if a < b {

tests/ui/manual_async_fn.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ LL | async fn inh_fut() -> i32 {
5757
help: move the body of the async block to the enclosing function
5858
|
5959
LL | fn inh_fut() -> impl Future<Output = i32> {
60-
LL | // NOTE: this code is here just to check that the identation is correct in the suggested fix
60+
LL | // NOTE: this code is here just to check that the indentation is correct in the suggested fix
6161
LL | let a = 42;
6262
LL | let b = 21;
6363
LL | if a < b {

tests/ui/never_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pub fn test14() {
166166
}
167167
}
168168

169-
// Issue #1991: the outter loop should not warn.
169+
// Issue #1991: the outer loop should not warn.
170170
pub fn test15() {
171171
'label: loop {
172172
while false {

tests/ui/precedence.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn main() {
3232
let _ = -(1i32.abs());
3333
let _ = -(1f32.abs());
3434

35-
// Odd functions shoud not trigger an error
35+
// Odd functions should not trigger an error
3636
let _ = -1f64.asin();
3737
let _ = -1f64.asinh();
3838
let _ = -1f64.atan();

tests/ui/precedence.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn main() {
3232
let _ = -(1i32.abs());
3333
let _ = -(1f32.abs());
3434

35-
// Odd functions shoud not trigger an error
35+
// Odd functions should not trigger an error
3636
let _ = -1f64.asin();
3737
let _ = -1f64.asinh();
3838
let _ = -1f64.atan();

tests/ui/vec_resize_to_zero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn main() {
77
// not applicable
88
vec![1, 2, 3, 4, 5].resize(2, 5);
99

10-
// applicable here, but only implemented for integer litterals for now
10+
// applicable here, but only implemented for integer literals for now
1111
vec!["foo", "bar", "baz"].resize(0, "bar");
1212

1313
// not applicable

0 commit comments

Comments
 (0)