Skip to content

Commit 778ce4d

Browse files
committed
update to the rust-PR that unblocks clippy
1 parent 4a05fbb commit 778ce4d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+217
-217
lines changed

clippy_lints/src/approx_const.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ impl LintPass for Pass {
5959
}
6060
}
6161

62-
impl LateLintPass for Pass {
63-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
62+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
63+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
6464
if let ExprLit(ref lit) = e.node {
6565
check_lit(cx, lit, e);
6666
}

clippy_lints/src/arithmetic.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ impl LintPass for Arithmetic {
4747
}
4848
}
4949

50-
impl LateLintPass for Arithmetic {
51-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
50+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
51+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
5252
if self.span.is_some() {
5353
return;
5454
}
@@ -82,7 +82,7 @@ impl LateLintPass for Arithmetic {
8282
}
8383
}
8484

85-
fn check_expr_post<'a, 'tcx: 'a>(&mut self, _: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
85+
fn check_expr_post(&mut self, _: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
8686
if Some(expr.span) == self.span {
8787
self.span = None;
8888
}

clippy_lints/src/array_indexing.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ impl LintPass for ArrayIndexing {
5555
}
5656
}
5757

58-
impl LateLintPass for ArrayIndexing {
59-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx hir::Expr) {
58+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ArrayIndexing {
59+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx hir::Expr) {
6060
if let hir::ExprIndex(ref array, ref index) = e.node {
6161
// Array with known size can be checked statically
6262
let ty = cx.tcx.tables().expr_ty(array);

clippy_lints/src/assign_ops.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ impl LintPass for AssignOps {
6666
}
6767
}
6868

69-
impl LateLintPass for AssignOps {
70-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
69+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
70+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
7171
match expr.node {
7272
hir::ExprAssignOp(op, ref lhs, ref rhs) => {
7373
span_lint_and_then(cx, ASSIGN_OPS, expr.span, "assign operation detected", |db| {

clippy_lints/src/attrs.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ impl LintPass for AttrPass {
8181
}
8282
}
8383

84-
impl LateLintPass for AttrPass {
85-
fn check_attribute<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, attr: &'tcx Attribute) {
84+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AttrPass {
85+
fn check_attribute(&mut self, cx: &LateContext<'a, 'tcx>, attr: &'tcx Attribute) {
8686
if let MetaItemKind::List(ref items) = attr.value.node {
8787
if items.is_empty() || attr.name() != "deprecated" {
8888
return;
@@ -99,7 +99,7 @@ impl LateLintPass for AttrPass {
9999
}
100100
}
101101

102-
fn check_item<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
102+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
103103
if is_relevant_item(cx, item) {
104104
check_attrs(cx, item.span, &item.name, &item.attrs)
105105
}
@@ -138,13 +138,13 @@ impl LateLintPass for AttrPass {
138138
}
139139
}
140140

141-
fn check_impl_item<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem) {
141+
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem) {
142142
if is_relevant_impl(cx, item) {
143143
check_attrs(cx, item.span, &item.name, &item.attrs)
144144
}
145145
}
146146

147-
fn check_trait_item<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem) {
147+
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem) {
148148
if is_relevant_trait(cx, item) {
149149
check_attrs(cx, item.span, &item.name, &item.attrs)
150150
}

clippy_lints/src/bit_mask.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ impl LintPass for BitMask {
7979
}
8080
}
8181

82-
impl LateLintPass for BitMask {
83-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
82+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BitMask {
83+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
8484
if let ExprBinary(ref cmp, ref left, ref right) = e.node {
8585
if cmp.node.is_comparison() {
8686
if let Some(cmp_opt) = fetch_int_literal(cx, right) {

clippy_lints/src/blacklisted_name.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ impl LintPass for BlackListedName {
3737
}
3838
}
3939

40-
impl LateLintPass for BlackListedName {
41-
fn check_pat<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, pat: &'tcx Pat) {
40+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlackListedName {
41+
fn check_pat(&mut self, cx: &LateContext<'a, 'tcx>, pat: &'tcx Pat) {
4242
if let PatKind::Binding(_, _, ref ident, _) = pat.node {
4343
if self.blacklist.iter().any(|s| s == &*ident.node.as_str()) {
4444
span_lint(cx,

clippy_lints/src/block_in_if_condition.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ const BRACED_EXPR_MESSAGE: &'static str = "omit braces around single expression
7474
const COMPLEX_BLOCK_MESSAGE: &'static str = "in an 'if' condition, avoid complex blocks or closures with blocks; \
7575
instead, move the block or closure higher and bind it with a 'let'";
7676

77-
impl LateLintPass for BlockInIfCondition {
78-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
77+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlockInIfCondition {
78+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
7979
if let ExprIf(ref check, ref then, _) = expr.node {
8080
if let ExprBlock(ref block) = check.node {
8181
if block.rules == DefaultBlock {

clippy_lints/src/booleans.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ impl LintPass for NonminimalBool {
5353
}
5454
}
5555

56-
impl LateLintPass for NonminimalBool {
57-
fn check_item<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
56+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonminimalBool {
57+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
5858
NonminimalBoolVisitor { cx: cx }.visit_item(item)
5959
}
6060
}

clippy_lints/src/copies.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ impl LintPass for CopyAndPaste {
109109
}
110110
}
111111

112-
impl LateLintPass for CopyAndPaste {
113-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
112+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyAndPaste {
113+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
114114
if !in_macro(cx, expr.span) {
115115
// skip ifs directly in else, it will be checked in the parent if
116116
if let Some(&Expr { node: ExprIf(_, _, Some(ref else_expr)), .. }) = get_parent_expr(cx, expr) {

clippy_lints/src/cyclomatic_complexity.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -90,31 +90,31 @@ impl CyclomaticComplexity {
9090
}
9191
}
9292

93-
impl LateLintPass for CyclomaticComplexity {
94-
fn check_item<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
93+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CyclomaticComplexity {
94+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
9595
if let ItemFn(_, _, _, _, _, eid) = item.node {
9696
if !attr::contains_name(&item.attrs, "test") {
9797
self.check(cx, cx.tcx.map.expr(eid), item.span);
9898
}
9999
}
100100
}
101101

102-
fn check_impl_item<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem) {
102+
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem) {
103103
if let ImplItemKind::Method(_, eid) = item.node {
104104
self.check(cx, cx.tcx.map.expr(eid), item.span);
105105
}
106106
}
107107

108-
fn check_trait_item<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem) {
108+
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem) {
109109
if let MethodTraitItem(_, Some(eid)) = item.node {
110110
self.check(cx, cx.tcx.map.expr(eid), item.span);
111111
}
112112
}
113113

114-
fn enter_lint_attrs<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, attrs: &'tcx [Attribute]) {
114+
fn enter_lint_attrs(&mut self, cx: &LateContext<'a, 'tcx>, attrs: &'tcx [Attribute]) {
115115
self.limit.push_attrs(cx.sess(), attrs, "cyclomatic_complexity");
116116
}
117-
fn exit_lint_attrs<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, attrs: &'tcx [Attribute]) {
117+
fn exit_lint_attrs(&mut self, cx: &LateContext<'a, 'tcx>, attrs: &'tcx [Attribute]) {
118118
self.limit.pop_attrs(cx.sess(), attrs, "cyclomatic_complexity");
119119
}
120120
}

clippy_lints/src/derive.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ impl LintPass for Derive {
7070
}
7171
}
7272

73-
impl LateLintPass for Derive {
74-
fn check_item<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
73+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Derive {
74+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
7575
if let ItemImpl(_, _, _, Some(ref trait_ref), _, _) = item.node {
7676
let ty = cx.tcx.item_type(cx.tcx.map.local_def_id(item.id));
7777
let is_automatically_derived = is_automatically_derived(&*item.attrs);
@@ -86,7 +86,7 @@ impl LateLintPass for Derive {
8686
}
8787

8888
/// Implementation of the `DERIVE_HASH_XOR_EQ` lint.
89-
fn check_hash_peq<'a, 'tcx: 'a>(cx: &LateContext<'a, 'tcx>, span: Span, trait_ref: &TraitRef, ty: ty::Ty<'tcx>,
89+
fn check_hash_peq<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, span: Span, trait_ref: &TraitRef, ty: ty::Ty<'tcx>,
9090
hash_is_automatically_derived: bool) {
9191
if_let_chain! {[
9292
match_path_old(&trait_ref.path, &paths::HASH),

clippy_lints/src/drop_ref.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ impl LintPass for Pass {
3535
}
3636
}
3737

38-
impl LateLintPass for Pass {
39-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
38+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
39+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
4040
if let ExprCall(ref path, ref args) = expr.node {
4141
if let ExprPath(ref qpath) = path.node {
4242
let def_id = cx.tcx.tables().qpath_def(qpath, path.id).def_id();

clippy_lints/src/entry.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ impl LintPass for HashMapLint {
3939
}
4040
}
4141

42-
impl LateLintPass for HashMapLint {
43-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
42+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for HashMapLint {
43+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
4444
if let ExprIf(ref check, ref then_block, ref else_block) = expr.node {
4545
if let ExprUnary(UnOp::UnNot, ref check) = check.node {
4646
if let Some((ty, map, key)) = check_cond(cx, check) {

clippy_lints/src/enum_clike.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ impl LintPass for UnportableVariant {
3636
}
3737
}
3838

39-
impl LateLintPass for UnportableVariant {
39+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
4040
#[allow(cast_possible_truncation, cast_sign_loss)]
41-
fn check_item<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
41+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
4242
if let ItemEnum(ref def, _) = item.node {
4343
for var in &def.variants {
4444
let variant = &var.node;

clippy_lints/src/enum_glob_use.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ impl LintPass for EnumGlobUse {
3232
}
3333
}
3434

35-
impl LateLintPass for EnumGlobUse {
36-
fn check_mod<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, m: &'tcx Mod, _: Span, _: NodeId) {
35+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {
36+
fn check_mod(&mut self, cx: &LateContext<'a, 'tcx>, m: &'tcx Mod, _: Span, _: NodeId) {
3737
// only check top level `use` statements
3838
for item in &m.item_ids {
3939
self.lint_item(cx, cx.krate.item(item.id));

clippy_lints/src/eq_op.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ impl LintPass for EqOp {
3232
}
3333
}
3434

35-
impl LateLintPass for EqOp {
36-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
35+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EqOp {
36+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
3737
if let ExprBinary(ref op, ref left, ref right) = e.node {
3838
if is_valid_operator(op) && SpanlessEq::new(cx).ignore_fn().eq_expr(left, right) {
3939
span_lint(cx,

clippy_lints/src/escape.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ impl LintPass for Pass {
6060
}
6161
}
6262

63-
impl LateLintPass for Pass {
64-
fn check_fn<'a, 'tcx: 'a>(
63+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
64+
fn check_fn(
6565
&mut self,
6666
cx: &LateContext<'a, 'tcx>,
6767
_: visit::FnKind<'tcx>,

clippy_lints/src/eta_reduction.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ impl LintPass for EtaPass {
3333
}
3434
}
3535

36-
impl LateLintPass for EtaPass {
37-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
36+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EtaPass {
37+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
3838
match expr.node {
3939
ExprCall(_, ref args) |
4040
ExprMethodCall(_, _, ref args) => {

clippy_lints/src/eval_order_dependence.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ impl LintPass for EvalOrderDependence {
5656
}
5757
}
5858

59-
impl LateLintPass for EvalOrderDependence {
60-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
59+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EvalOrderDependence {
60+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
6161
// Find a write to a local variable.
6262
match expr.node {
6363
ExprAssign(ref lhs, _) | ExprAssignOp(_, ref lhs, _) => {
@@ -79,7 +79,7 @@ impl LateLintPass for EvalOrderDependence {
7979
_ => {}
8080
}
8181
}
82-
fn check_stmt<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, stmt: &'tcx Stmt) {
82+
fn check_stmt(&mut self, cx: &LateContext<'a, 'tcx>, stmt: &'tcx Stmt) {
8383
match stmt.node {
8484
StmtExpr(ref e, _) | StmtSemi(ref e, _) => DivergenceVisitor { cx: cx }.maybe_walk_expr(e),
8585
StmtDecl(ref d, _) => {
@@ -214,7 +214,7 @@ enum StopEarly {
214214
Stop,
215215
}
216216

217-
fn check_expr<'a, 'tcx: 'a>(vis: & mut ReadVisitor<'a, 'tcx>, expr: &'tcx Expr) -> StopEarly {
217+
fn check_expr<'a, 'tcx>(vis: & mut ReadVisitor<'a, 'tcx>, expr: &'tcx Expr) -> StopEarly {
218218
if expr.id == vis.last_expr.id {
219219
return StopEarly::KeepGoing;
220220
}
@@ -263,7 +263,7 @@ fn check_expr<'a, 'tcx: 'a>(vis: & mut ReadVisitor<'a, 'tcx>, expr: &'tcx Expr)
263263
StopEarly::KeepGoing
264264
}
265265

266-
fn check_stmt<'a, 'tcx: 'a>(vis: &mut ReadVisitor<'a, 'tcx>, stmt: &'tcx Stmt) -> StopEarly {
266+
fn check_stmt<'a, 'tcx>(vis: &mut ReadVisitor<'a, 'tcx>, stmt: &'tcx Stmt) -> StopEarly {
267267
match stmt.node {
268268
StmtExpr(ref expr, _) |
269269
StmtSemi(ref expr, _) => check_expr(vis, expr),

clippy_lints/src/format.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ impl LintPass for Pass {
3838
}
3939
}
4040

41-
impl LateLintPass for Pass {
42-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
41+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
42+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
4343
if let Some(span) = is_expn_of(cx, expr.span, "format") {
4444
match expr.node {
4545
// `format!("{}", foo)` expansion

clippy_lints/src/functions.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ impl LintPass for Functions {
6868
}
6969
}
7070

71-
impl LateLintPass for Functions {
72-
fn check_fn<'a, 'tcx: 'a>(
71+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
72+
fn check_fn(
7373
&mut self,
7474
cx: &LateContext<'a, 'tcx>,
7575
kind: intravisit::FnKind<'tcx>,
@@ -105,7 +105,7 @@ impl LateLintPass for Functions {
105105
self.check_raw_ptr(cx, unsafety, decl, expr, nodeid);
106106
}
107107

108-
fn check_trait_item<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::TraitItem) {
108+
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::TraitItem) {
109109
if let hir::MethodTraitItem(ref sig, eid) = item.node {
110110
// don't lint extern functions decls, it's not their fault
111111
if sig.abi == Abi::Rust {
@@ -120,7 +120,7 @@ impl LateLintPass for Functions {
120120
}
121121
}
122122

123-
impl Functions {
123+
impl<'a, 'tcx> Functions {
124124
fn check_arg_number(&self, cx: &LateContext, decl: &hir::FnDecl, span: Span) {
125125
let args = decl.inputs.len() as u64;
126126
if args > self.threshold {
@@ -131,7 +131,7 @@ impl Functions {
131131
}
132132
}
133133

134-
fn check_raw_ptr<'a, 'tcx: 'a>(
134+
fn check_raw_ptr(
135135
&self,
136136
cx: &LateContext<'a, 'tcx>,
137137
unsafety: hir::Unsafety,

clippy_lints/src/identity_op.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ impl LintPass for IdentityOp {
3131
}
3232
}
3333

34-
impl LateLintPass for IdentityOp {
35-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
34+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for IdentityOp {
35+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr) {
3636
if in_macro(cx, e.span) {
3737
return;
3838
}

clippy_lints/src/if_let_redundant_pattern_matching.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ impl LintPass for Pass {
4242
}
4343
}
4444

45-
impl LateLintPass for Pass {
46-
fn check_expr<'a, 'tcx: 'a>(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
45+
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
46+
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
4747

4848
if let ExprMatch(ref op, ref arms, MatchSource::IfLetDesugar{..}) = expr.node {
4949

0 commit comments

Comments
 (0)