Skip to content

Commit 527fb42

Browse files
committed
Add all the semicolons to clippy_lints
1 parent cadad20 commit 527fb42

15 files changed

+31
-31
lines changed

clippy_lints/src/neg_cmp_op_on_partial_ord.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl<'tcx> LateLintPass<'tcx> for NoNegCompOpForPartialOrd {
8484
types produces code that is hard to read and refactor, please \
8585
consider using the `partial_cmp` method instead, to make it \
8686
clear that the two values could be incomparable"
87-
)
87+
);
8888
}
8989
}
9090
}

clippy_lints/src/open_options.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fn check_open_options(cx: &LateContext<'_>, options: &[(OpenOption, Argument)],
123123
"the method `create` is called more than once",
124124
);
125125
} else {
126-
create = true
126+
create = true;
127127
}
128128
create_arg = create_arg || (arg == Argument::True);
129129
},
@@ -136,7 +136,7 @@ fn check_open_options(cx: &LateContext<'_>, options: &[(OpenOption, Argument)],
136136
"the method `append` is called more than once",
137137
);
138138
} else {
139-
append = true
139+
append = true;
140140
}
141141
append_arg = append_arg || (arg == Argument::True);
142142
},
@@ -149,7 +149,7 @@ fn check_open_options(cx: &LateContext<'_>, options: &[(OpenOption, Argument)],
149149
"the method `truncate` is called more than once",
150150
);
151151
} else {
152-
truncate = true
152+
truncate = true;
153153
}
154154
truncate_arg = truncate_arg || (arg == Argument::True);
155155
},
@@ -162,7 +162,7 @@ fn check_open_options(cx: &LateContext<'_>, options: &[(OpenOption, Argument)],
162162
"the method `read` is called more than once",
163163
);
164164
} else {
165-
read = true
165+
read = true;
166166
}
167167
read_arg = read_arg || (arg == Argument::True);
168168
},
@@ -175,7 +175,7 @@ fn check_open_options(cx: &LateContext<'_>, options: &[(OpenOption, Argument)],
175175
"the method `write` is called more than once",
176176
);
177177
} else {
178-
write = true
178+
write = true;
179179
}
180180
write_arg = write_arg || (arg == Argument::True);
181181
},

clippy_lints/src/question_mark.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl QuestionMark {
8888
"replace it with",
8989
replacement_str,
9090
applicability,
91-
)
91+
);
9292
}
9393
}
9494
}
@@ -129,7 +129,7 @@ impl QuestionMark {
129129
"replace it with",
130130
replacement,
131131
applicability,
132-
)
132+
);
133133
}
134134
}
135135
}

clippy_lints/src/redundant_closure_call.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl<'ast> ast_visit::Visitor<'ast> for ReturnVisitor {
5757
self.found_return = true;
5858
}
5959

60-
ast_visit::walk_expr(self, ex)
60+
ast_visit::walk_expr(self, ex);
6161
}
6262
}
6363

clippy_lints/src/redundant_pub_crate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl<'tcx> LateLintPass<'tcx> for RedundantPubCrate {
5959
Applicability::MachineApplicable,
6060
);
6161
},
62-
)
62+
);
6363
}
6464
}
6565
}

clippy_lints/src/returns.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl<'tcx> LateLintPass<'tcx> for Return {
139139
} else {
140140
RetReplacement::Empty
141141
};
142-
check_final_expr(cx, &body.value, Some(body.value.span), replacement)
142+
check_final_expr(cx, &body.value, Some(body.value.span), replacement);
143143
},
144144
FnKind::ItemFn(..) | FnKind::Method(..) => {
145145
if let ExprKind::Block(block, _) = body.value.kind {
@@ -241,7 +241,7 @@ fn emit_return_lint(cx: &LateContext<'_>, ret_span: Span, inner_span: Option<Spa
241241
if let Some(snippet) = snippet_opt(cx, inner_span) {
242242
diag.span_suggestion(ret_span, "remove `return`", snippet, Applicability::MachineApplicable);
243243
}
244-
})
244+
});
245245
},
246246
None => match replacement {
247247
RetReplacement::Empty => {

clippy_lints/src/shadow.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ fn check_fn<'tcx>(cx: &LateContext<'tcx>, decl: &'tcx FnDecl<'_>, body: &'tcx Bo
120120
let mut bindings = Vec::with_capacity(decl.inputs.len());
121121
for arg in iter_input_pats(decl, body) {
122122
if let PatKind::Binding(.., ident, _) = arg.pat.kind {
123-
bindings.push((ident.name, ident.span))
123+
bindings.push((ident.name, ident.span));
124124
}
125125
}
126126
check_expr(cx, &body.value, &mut bindings);
@@ -156,7 +156,7 @@ fn check_local<'tcx>(cx: &LateContext<'tcx>, local: &'tcx Local<'_>, bindings: &
156156
..
157157
} = *local;
158158
if let Some(t) = *ty {
159-
check_ty(cx, t, bindings)
159+
check_ty(cx, t, bindings);
160160
}
161161
if let Some(o) = *init {
162162
check_expr(cx, o, bindings);
@@ -324,14 +324,14 @@ fn check_expr<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, bindings: &mut
324324
}
325325
match expr.kind {
326326
ExprKind::Unary(_, e) | ExprKind::Field(e, _) | ExprKind::AddrOf(_, _, e) | ExprKind::Box(e) => {
327-
check_expr(cx, e, bindings)
327+
check_expr(cx, e, bindings);
328328
},
329329
ExprKind::Block(block, _) | ExprKind::Loop(block, ..) => check_block(cx, block, bindings),
330330
// ExprKind::Call
331331
// ExprKind::MethodCall
332332
ExprKind::Array(v) | ExprKind::Tup(v) => {
333333
for e in v {
334-
check_expr(cx, e, bindings)
334+
check_expr(cx, e, bindings);
335335
}
336336
},
337337
ExprKind::If(cond, then, ref otherwise) => {
@@ -374,7 +374,7 @@ fn check_ty<'tcx>(cx: &LateContext<'tcx>, ty: &'tcx Ty<'_>, bindings: &mut Vec<(
374374
TyKind::Ptr(MutTy { ty: mty, .. }) | TyKind::Rptr(_, MutTy { ty: mty, .. }) => check_ty(cx, mty, bindings),
375375
TyKind::Tup(tup) => {
376376
for t in tup {
377-
check_ty(cx, t, bindings)
377+
check_ty(cx, t, bindings);
378378
}
379379
},
380380
TyKind::Typeof(ref anon_const) => check_expr(cx, &cx.tcx.hir().body(anon_const.body).value, bindings),

clippy_lints/src/slow_vector_initialization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ impl SlowVectorInit {
158158
) {
159159
match initialization {
160160
InitializationType::Extend(e) | InitializationType::Resize(e) => {
161-
Self::emit_lint(cx, e, vec_alloc, "slow zero-filling initialization")
161+
Self::emit_lint(cx, e, vec_alloc, "slow zero-filling initialization");
162162
},
163163
};
164164
}
@@ -290,7 +290,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VectorInitializationVisitor<'a, 'tcx> {
290290
fn visit_block(&mut self, block: &'tcx Block<'_>) {
291291
if self.initialization_found {
292292
if let Some(s) = block.stmts.get(0) {
293-
self.visit_stmt(s)
293+
self.visit_stmt(s);
294294
}
295295

296296
self.initialization_found = false;

clippy_lints/src/suspicious_operation_groupings.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ fn emit_suggestion(cx: &EarlyContext<'_>, span: Span, sugg: String, applicabilit
266266
"did you mean",
267267
sugg,
268268
applicability,
269-
)
269+
);
270270
}
271271

272272
fn ident_swap_sugg(
@@ -475,7 +475,7 @@ impl Add for IdentLocation {
475475

476476
impl AddAssign for IdentLocation {
477477
fn add_assign(&mut self, other: Self) {
478-
*self = *self + other
478+
*self = *self + other;
479479
}
480480
}
481481

@@ -506,7 +506,7 @@ impl Add for IdentDifference {
506506

507507
impl AddAssign for IdentDifference {
508508
fn add_assign(&mut self, other: Self) {
509-
*self = *self + other
509+
*self = *self + other;
510510
}
511511
}
512512

clippy_lints/src/types/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
306306
fn check_trait_item(&mut self, cx: &LateContext<'_>, item: &TraitItem<'_>) {
307307
match item.kind {
308308
TraitItemKind::Const(ty, _) | TraitItemKind::Type(_, Some(ty)) => {
309-
self.check_ty(cx, ty, CheckTyContext::default())
309+
self.check_ty(cx, ty, CheckTyContext::default());
310310
},
311311
TraitItemKind::Fn(ref sig, _) => self.check_fn_decl(cx, sig.decl, CheckTyContext::default()),
312312
TraitItemKind::Type(..) => (),
@@ -433,7 +433,7 @@ impl Types {
433433
},
434434
TyKind::Slice(ty) | TyKind::Array(ty, _) | TyKind::Ptr(MutTy { ty, .. }) => {
435435
context.is_nested_call = true;
436-
self.check_ty(cx, ty, context)
436+
self.check_ty(cx, ty, context);
437437
},
438438
TyKind::Tup(tys) => {
439439
context.is_nested_call = true;

0 commit comments

Comments
 (0)