Skip to content

Commit b02cb24

Browse files
committed
Auto merge of #13131 - waywardmonkeys:reduce-typo-count, r=Alexendoo
Reduce typo count. changelog: none
2 parents 057c4ae + cf4270d commit b02cb24

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

clippy_lints/src/matches/significant_drop_in_scrutinee.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl<'a, 'tcx> SigDropChecker<'a, 'tcx> {
232232
enum SigDropHolder {
233233
/// No values with significant drop present in this expression.
234234
///
235-
/// Expressions that we've emited lints do not count.
235+
/// Expressions that we've emitted lints do not count.
236236
None,
237237
/// Some field in this expression references to values with significant drop.
238238
///
@@ -426,7 +426,7 @@ fn ty_has_erased_regions(ty: Ty<'_>) -> bool {
426426

427427
impl<'a, 'tcx> Visitor<'tcx> for SigDropHelper<'a, 'tcx> {
428428
fn visit_expr(&mut self, ex: &'tcx Expr<'_>) {
429-
// We've emited a lint on some neighborhood expression. That lint will suggest to move out the
429+
// We've emitted a lint on some neighborhood expression. That lint will suggest to move out the
430430
// _parent_ expression (not the expression itself). Since we decide to move out the parent
431431
// expression, it is pointless to continue to process the current expression.
432432
if self.sig_drop_holder == SigDropHolder::Moved {
@@ -450,7 +450,7 @@ impl<'a, 'tcx> Visitor<'tcx> for SigDropHelper<'a, 'tcx> {
450450
ExprKind::Assign(lhs, _, _) | ExprKind::AssignOp(_, lhs, _)
451451
if lhs.hir_id == ex.hir_id && self.sig_drop_holder == SigDropHolder::Moved =>
452452
{
453-
// Never move out only the assignee. Instead, we should always move out the whole assigment.
453+
// Never move out only the assignee. Instead, we should always move out the whole assignment.
454454
self.replace_current_sig_drop(parent_ex.span, true, 0);
455455
},
456456
_ => {

clippy_lints/src/returns.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ fn check_final_expr<'tcx>(
394394

395395
// Returns may be used to turn an expression into a statement in rustc's AST.
396396
// This allows the addition of attributes, like `#[allow]` (See: clippy#9361)
397-
// `#[expect(clippy::needless_return)]` needs to be handled separatly to
398-
// actually fullfil the expectation (clippy::#12998)
397+
// `#[expect(clippy::needless_return)]` needs to be handled separately to
398+
// actually fulfill the expectation (clippy::#12998)
399399
match cx.tcx.hir().attrs(expr.hir_id) {
400400
[] => {},
401401
[attr] => {

lintcheck/src/output.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ impl ClippyWarning {
7777
.iter()
7878
.find(|span| span.is_primary)
7979
.or(diag.spans.first())
80-
.unwrap_or_else(|| panic!("Diagnositc without span: {diag}"));
80+
.unwrap_or_else(|| panic!("Diagnostic without span: {diag}"));
8181
let file = &span.file_name;
8282
let url = if let Some(src_split) = file.find("/src/") {
83-
// This removes the inital `target/lintcheck/sources/<crate>-<version>/`
83+
// This removes the initial `target/lintcheck/sources/<crate>-<version>/`
8484
let src_split = src_split + "/src/".len();
8585
let (_, file) = file.split_at(src_split);
8686

tests/ui/deref_addrof.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn main() {
4545
let _ = unsafe { *core::ptr::addr_of!(a) };
4646

4747
let _repeat = [0; 64];
48-
// do NOT lint for array as sematic differences with/out `*&`.
48+
// do NOT lint for array as semantic differences with/out `*&`.
4949
let _arr = *&[0, 1, 2, 3, 4];
5050
}
5151

tests/ui/deref_addrof.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn main() {
4545
let _ = unsafe { *core::ptr::addr_of!(a) };
4646

4747
let _repeat = *&[0; 64];
48-
// do NOT lint for array as sematic differences with/out `*&`.
48+
// do NOT lint for array as semantic differences with/out `*&`.
4949
let _arr = *&[0, 1, 2, 3, 4];
5050
}
5151

tests/ui/missing_const_for_fn/could_be_const.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ mod with_ty_alias {
200200
}
201201
// NOTE: When checking the type of a function param, make sure it is not an alias with
202202
// `AliasTyKind::Projection` before calling `TyCtxt::type_of` to find out what the actual type
203-
// is. Because the associate ty could have no default, therefore would cause ICE, as demostrated
203+
// is. Because the associate ty could have no default, therefore would cause ICE, as demonstrated
204204
// in this test.
205205
const fn alias_ty_is_projection(bar: <() as FooTrait>::Foo) {}
206206
}

tests/ui/missing_const_for_fn/could_be_const.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ mod with_ty_alias {
200200
}
201201
// NOTE: When checking the type of a function param, make sure it is not an alias with
202202
// `AliasTyKind::Projection` before calling `TyCtxt::type_of` to find out what the actual type
203-
// is. Because the associate ty could have no default, therefore would cause ICE, as demostrated
203+
// is. Because the associate ty could have no default, therefore would cause ICE, as demonstrated
204204
// in this test.
205205
fn alias_ty_is_projection(bar: <() as FooTrait>::Foo) {}
206206
}

tests/ui/zero_repeat_side_effects.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn main() {
2020
f(); b = [] as [i32; 0];
2121

2222
// on vecs
23-
// vecs dont support infering value of consts
23+
// vecs dont support inferring value of consts
2424
f(); let c: std::vec::Vec<i32> = vec![];
2525
let d;
2626
f(); d = vec![] as std::vec::Vec<i32>;

tests/ui/zero_repeat_side_effects.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn main() {
2020
b = [f(); 0];
2121

2222
// on vecs
23-
// vecs dont support infering value of consts
23+
// vecs dont support inferring value of consts
2424
let c = vec![f(); 0];
2525
let d;
2626
d = vec![f(); 0];

0 commit comments

Comments
 (0)