Skip to content

Commit 9eb2b22

Browse files
committed
Auto merge of #12079 - yuxqiu:fix_typos, r=Manishearth
Fix some typos changelog: none
2 parents e73bb00 + 88541d6 commit 9eb2b22

16 files changed

+21
-21
lines changed

book/src/development/macro_expansions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ let x: Option<u32> = Some(42);
102102
m!(x, x.unwrap());
103103
```
104104

105-
If the `m!(x, x.unwrapp());` line is expanded, we would get two expanded
105+
If the `m!(x, x.unwrap());` line is expanded, we would get two expanded
106106
expressions:
107107

108108
- `x.is_some()` (from the `$a.is_some()` line in the `m` macro)

clippy_lints/src/methods/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3786,7 +3786,7 @@ declare_clippy_lint! {
37863786
///
37873787
/// ### Why is this bad?
37883788
/// This pattern is often followed by manual unwrapping of the `Option`. The simplification
3789-
/// results in more readable and succint code without the need for manual unwrapping.
3789+
/// results in more readable and succinct code without the need for manual unwrapping.
37903790
///
37913791
/// ### Example
37923792
/// ```no_run
@@ -3812,7 +3812,7 @@ declare_clippy_lint! {
38123812
///
38133813
/// ### Why is this bad?
38143814
/// This pattern is often followed by manual unwrapping of `Result`. The simplification
3815-
/// results in more readable and succint code without the need for manual unwrapping.
3815+
/// results in more readable and succinct code without the need for manual unwrapping.
38163816
///
38173817
/// ### Example
38183818
/// ```no_run

clippy_lints/src/missing_asserts_for_indexing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ fn report_indexes(cx: &LateContext<'_>, map: &UnhashMap<u64, Vec<IndexEntry<'_>>
331331
slice,
332332
} if indexes.len() > 1 => {
333333
// if we have found an `assert!`, let's also check that it's actually right
334-
// and if it convers the highest index and if not, suggest the correct length
334+
// and if it covers the highest index and if not, suggest the correct length
335335
let sugg = match comparison {
336336
// `v.len() < 5` and `v.len() <= 5` does nothing in terms of bounds checks.
337337
// The user probably meant `v.len() > 5`

clippy_lints/src/no_effect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ fn check_no_effect(cx: &LateContext<'_>, stmt: &Stmt<'_>) -> bool {
165165
}
166166

167167
fn is_operator_overridden(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
168-
// It's very hard or impossable to check whether overridden operator have side-effect this lint.
168+
// It's very hard or impossible to check whether overridden operator have side-effect this lint.
169169
// So, this function assume user-defined operator is overridden with an side-effect.
170170
// The definition of user-defined structure here is ADT-type,
171171
// Althrough this will weaken the ability of this lint, less error lint-fix happen.

clippy_lints/src/serde_api.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_session::declare_lint_pass;
66

77
declare_clippy_lint! {
88
/// ### What it does
9-
/// Checks for mis-uses of the serde API.
9+
/// Checks for misuses of the serde API.
1010
///
1111
/// ### Why is this bad?
1212
/// Serde is very finnicky about how its API should be

clippy_lints/src/wildcard_imports.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl LateLintPass<'_> for WildcardImports {
142142
} else {
143143
// In this case, the `use_path.span` ends right before the `::*`, so we need to
144144
// extend it up to the `*`. Since it is hard to find the `*` in weird
145-
// formattings like `use _ :: *;`, we extend it up to, but not including the
145+
// formatting like `use _ :: *;`, we extend it up to, but not including the
146146
// `;`. In nested imports, like `use _::{inner::*, _}` there is no `;` and we
147147
// can just use the end of the item span
148148
let mut span = use_path.span.with_hi(item.span.hi());

clippy_utils/src/ty/type_certainty/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn expr_type_certainty(cx: &LateContext<'_>, expr: &Expr<'_>) -> Certainty {
3838

3939
ExprKind::Call(callee, args) => {
4040
let lhs = expr_type_certainty(cx, callee);
41-
let rhs = if type_is_inferrable_from_arguments(cx, expr) {
41+
let rhs = if type_is_inferable_from_arguments(cx, expr) {
4242
meet(args.iter().map(|arg| expr_type_certainty(cx, arg)))
4343
} else {
4444
Certainty::Uncertain
@@ -57,7 +57,7 @@ fn expr_type_certainty(cx: &LateContext<'_>, expr: &Expr<'_>) -> Certainty {
5757
receiver_type_certainty = receiver_type_certainty.with_def_id(self_ty_def_id);
5858
};
5959
let lhs = path_segment_certainty(cx, receiver_type_certainty, method, false);
60-
let rhs = if type_is_inferrable_from_arguments(cx, expr) {
60+
let rhs = if type_is_inferable_from_arguments(cx, expr) {
6161
meet(
6262
std::iter::once(receiver_type_certainty).chain(args.iter().map(|arg| expr_type_certainty(cx, arg))),
6363
)
@@ -279,7 +279,7 @@ fn update_res(cx: &LateContext<'_>, parent_certainty: Certainty, path_segment: &
279279
}
280280

281281
#[allow(clippy::cast_possible_truncation)]
282-
fn type_is_inferrable_from_arguments(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
282+
fn type_is_inferable_from_arguments(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
283283
let Some(callee_def_id) = (match expr.kind {
284284
ExprKind::Call(callee, _) => {
285285
let callee_ty = cx.typeck_results().expr_ty(callee);

tests/ui/as_conversions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn main() {
1717
with_span!(
1818
span
1919

20-
fn coverting() {
20+
fn converting() {
2121
let x = 0u32 as u64;
2222
}
2323
);

tests/ui/default_numeric_fallback_i32.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ fn check_expect_suppression() {
184184
let x = 21;
185185
}
186186

187-
mod type_already_infered {
187+
mod type_already_inferred {
188188
// Should NOT lint if bound to return type
189189
fn ret_i32() -> i32 {
190190
1

tests/ui/default_numeric_fallback_i32.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ fn check_expect_suppression() {
184184
let x = 21;
185185
}
186186

187-
mod type_already_infered {
187+
mod type_already_inferred {
188188
// Should NOT lint if bound to return type
189189
fn ret_i32() -> i32 {
190190
1

tests/ui/redundant_as_str.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fn main() {
1111
let _no_as_str = string.as_bytes();
1212
let _no_as_str = string.is_empty();
1313

14-
// These methods are not redundant, and are equivelant to
14+
// These methods are not redundant, and are equivalent to
1515
// doing dereferencing the string and applying the method
1616
let _not_redundant = string.as_str().escape_unicode();
1717
let _not_redundant = string.as_str().trim();

tests/ui/redundant_as_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fn main() {
1111
let _no_as_str = string.as_bytes();
1212
let _no_as_str = string.is_empty();
1313

14-
// These methods are not redundant, and are equivelant to
14+
// These methods are not redundant, and are equivalent to
1515
// doing dereferencing the string and applying the method
1616
let _not_redundant = string.as_str().escape_unicode();
1717
let _not_redundant = string.as_str().trim();

tests/ui/regex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fn trivial_regex() {
113113
// #6005: unicode classes in bytes::Regex
114114
let a_byte_of_unicode = BRegex::new(r"\p{C}");
115115

116-
// start and end word boundry, introduced in regex 0.10
116+
// start and end word boundary, introduced in regex 0.10
117117
let _ = BRegex::new(r"\<word\>");
118118
let _ = BRegex::new(r"\b{start}word\b{end}");
119119
}

tests/ui/struct_fields.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct NotSnakeCase2 {
6565
someData_a_b: bool,
6666
}
6767

68-
// no error, threshold is 3 fiels by default
68+
// no error, threshold is 3 fields by default
6969
struct Fooo {
7070
foo: u8,
7171
bar: u8,

tests/ui/useless_conversion.fixed

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ mod issue11300 {
241241
foo2::<(), _>([1, 2, 3].into_iter());
242242

243243
// This should lint. Removing the `.into_iter()` means that `I` gets substituted with `[i32; 3]`,
244-
// and `i32: Helper2<[i32, 3]>` is true, so this call is indeed unncessary.
244+
// and `i32: Helper2<[i32, 3]>` is true, so this call is indeed unnecessary.
245245
foo3([1, 2, 3]);
246246
}
247247

@@ -253,7 +253,7 @@ mod issue11300 {
253253

254254
S1.foo([1, 2]);
255255

256-
// ICE that occured in itertools
256+
// ICE that occurred in itertools
257257
trait Itertools {
258258
fn interleave_shortest<J>(self, other: J)
259259
where

tests/ui/useless_conversion.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ mod issue11300 {
241241
foo2::<(), _>([1, 2, 3].into_iter());
242242

243243
// This should lint. Removing the `.into_iter()` means that `I` gets substituted with `[i32; 3]`,
244-
// and `i32: Helper2<[i32, 3]>` is true, so this call is indeed unncessary.
244+
// and `i32: Helper2<[i32, 3]>` is true, so this call is indeed unnecessary.
245245
foo3([1, 2, 3].into_iter());
246246
}
247247

@@ -253,7 +253,7 @@ mod issue11300 {
253253

254254
S1.foo([1, 2].into_iter());
255255

256-
// ICE that occured in itertools
256+
// ICE that occurred in itertools
257257
trait Itertools {
258258
fn interleave_shortest<J>(self, other: J)
259259
where

0 commit comments

Comments
 (0)