Skip to content

Commit c493090

Browse files
committed
Auto merge of #5763 - flip1995:rustup, r=Manishearth
Rustup changelog: none
2 parents 52cc5fc + a7c58e6 commit c493090

File tree

157 files changed

+1039
-1113
lines changed

Some content is hidden

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

157 files changed

+1039
-1113
lines changed

clippy_lints/src/approx_const.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ const KNOWN_CONSTS: [(f64, &str, usize); 18] = [
6060

6161
declare_lint_pass!(ApproxConstant => [APPROX_CONSTANT]);
6262

63-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ApproxConstant {
64-
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr<'_>) {
63+
impl<'tcx> LateLintPass<'tcx> for ApproxConstant {
64+
fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
6565
if let ExprKind::Lit(lit) = &e.kind {
6666
check_lit(cx, &lit.node, e);
6767
}
6868
}
6969
}
7070

71-
fn check_lit(cx: &LateContext<'_, '_>, lit: &LitKind, e: &Expr<'_>) {
71+
fn check_lit(cx: &LateContext<'_>, lit: &LitKind, e: &Expr<'_>) {
7272
match *lit {
7373
LitKind::Float(s, LitFloatType::Suffixed(fty)) => match fty {
7474
FloatTy::F32 => check_known_consts(cx, e, s, "f32"),
@@ -79,7 +79,7 @@ fn check_lit(cx: &LateContext<'_, '_>, lit: &LitKind, e: &Expr<'_>) {
7979
}
8080
}
8181

82-
fn check_known_consts(cx: &LateContext<'_, '_>, e: &Expr<'_>, s: symbol::Symbol, module: &str) {
82+
fn check_known_consts(cx: &LateContext<'_>, e: &Expr<'_>, s: symbol::Symbol, module: &str) {
8383
let s = s.as_str();
8484
if s.parse::<f64>().is_ok() {
8585
for &(constant, name, min_digits) in &KNOWN_CONSTS {

clippy_lints/src/arithmetic.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ pub struct Arithmetic {
5858

5959
impl_lint_pass!(Arithmetic => [INTEGER_ARITHMETIC, FLOAT_ARITHMETIC]);
6060

61-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
62-
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr<'_>) {
61+
impl<'tcx> LateLintPass<'tcx> for Arithmetic {
62+
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) {
6363
if self.expr_span.is_some() {
6464
return;
6565
}
@@ -111,13 +111,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
111111
}
112112
}
113113

114-
fn check_expr_post(&mut self, _: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr<'_>) {
114+
fn check_expr_post(&mut self, _: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) {
115115
if Some(expr.span) == self.expr_span {
116116
self.expr_span = None;
117117
}
118118
}
119119

120-
fn check_body(&mut self, cx: &LateContext<'_, '_>, body: &hir::Body<'_>) {
120+
fn check_body(&mut self, cx: &LateContext<'_>, body: &hir::Body<'_>) {
121121
let body_owner = cx.tcx.hir().body_owner(body.id());
122122

123123
match cx.tcx.hir().body_owner_kind(body_owner) {
@@ -135,7 +135,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
135135
}
136136
}
137137

138-
fn check_body_post(&mut self, cx: &LateContext<'_, '_>, body: &hir::Body<'_>) {
138+
fn check_body_post(&mut self, cx: &LateContext<'_>, body: &hir::Body<'_>) {
139139
let body_owner = cx.tcx.hir().body_owner(body.id());
140140
let body_span = cx.tcx.hir().span(body_owner);
141141

clippy_lints/src/assertions_on_constants.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ declare_clippy_lint! {
2929

3030
declare_lint_pass!(AssertionsOnConstants => [ASSERTIONS_ON_CONSTANTS]);
3131

32-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssertionsOnConstants {
33-
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr<'_>) {
32+
impl<'tcx> LateLintPass<'tcx> for AssertionsOnConstants {
33+
fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
3434
let lint_true = |is_debug: bool| {
3535
span_lint_and_help(
3636
cx,
@@ -114,7 +114,7 @@ enum AssertKind {
114114
/// ```
115115
///
116116
/// where `message` is any expression and `c` is a constant bool.
117-
fn match_assert_with_message<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) -> Option<AssertKind> {
117+
fn match_assert_with_message<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<AssertKind> {
118118
if_chain! {
119119
if let ExprKind::Match(ref expr, ref arms, _) = expr.kind;
120120
// matches { let _t = expr; _t }

clippy_lints/src/assign_ops.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ declare_clippy_lint! {
6060

6161
declare_lint_pass!(AssignOps => [ASSIGN_OP_PATTERN, MISREFACTORED_ASSIGN_OP]);
6262

63-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
63+
impl<'tcx> LateLintPass<'tcx> for AssignOps {
6464
#[allow(clippy::too_many_lines)]
65-
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr<'_>) {
65+
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) {
6666
match &expr.kind {
6767
hir::ExprKind::AssignOp(op, lhs, rhs) => {
6868
if let hir::ExprKind::Binary(binop, l, r) = &rhs.kind {
@@ -191,7 +191,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AssignOps {
191191
}
192192

193193
fn lint_misrefactored_assign_op(
194-
cx: &LateContext<'_, '_>,
194+
cx: &LateContext<'_>,
195195
expr: &hir::Expr<'_>,
196196
op: hir::BinOp,
197197
rhs: &hir::Expr<'_>,
@@ -246,7 +246,7 @@ fn is_commutative(op: hir::BinOpKind) -> bool {
246246
struct ExprVisitor<'a, 'tcx> {
247247
assignee: &'a hir::Expr<'a>,
248248
counter: u8,
249-
cx: &'a LateContext<'a, 'tcx>,
249+
cx: &'a LateContext<'tcx>,
250250
}
251251

252252
impl<'a, 'tcx> Visitor<'tcx> for ExprVisitor<'a, 'tcx> {

clippy_lints/src/atomic_ordering.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const ATOMIC_TYPES: [&str; 12] = [
5252
"AtomicUsize",
5353
];
5454

55-
fn type_is_atomic(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
55+
fn type_is_atomic(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
5656
if let ty::Adt(&ty::AdtDef { did, .. }, _) = cx.tables().expr_ty(expr).kind {
5757
ATOMIC_TYPES
5858
.iter()
@@ -62,21 +62,21 @@ fn type_is_atomic(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
6262
}
6363
}
6464

65-
fn match_ordering_def_path(cx: &LateContext<'_, '_>, did: DefId, orderings: &[&str]) -> bool {
65+
fn match_ordering_def_path(cx: &LateContext<'_>, did: DefId, orderings: &[&str]) -> bool {
6666
orderings
6767
.iter()
6868
.any(|ordering| match_def_path(cx, did, &["core", "sync", "atomic", "Ordering", ordering]))
6969
}
7070

71-
fn check_atomic_load_store(cx: &LateContext<'_, '_>, expr: &Expr<'_>) {
71+
fn check_atomic_load_store(cx: &LateContext<'_>, expr: &Expr<'_>) {
7272
if_chain! {
7373
if let ExprKind::MethodCall(ref method_path, _, args, _) = &expr.kind;
7474
let method = method_path.ident.name.as_str();
7575
if type_is_atomic(cx, &args[0]);
7676
if method == "load" || method == "store";
7777
let ordering_arg = if method == "load" { &args[1] } else { &args[2] };
7878
if let ExprKind::Path(ref ordering_qpath) = ordering_arg.kind;
79-
if let Some(ordering_def_id) = cx.tables().qpath_res(ordering_qpath, ordering_arg.hir_id).opt_def_id();
79+
if let Some(ordering_def_id) = cx.qpath_res(ordering_qpath, ordering_arg.hir_id).opt_def_id();
8080
then {
8181
if method == "load" &&
8282
match_ordering_def_path(cx, ordering_def_id, &["Release", "AcqRel"]) {
@@ -103,16 +103,16 @@ fn check_atomic_load_store(cx: &LateContext<'_, '_>, expr: &Expr<'_>) {
103103
}
104104
}
105105

106-
fn check_memory_fence(cx: &LateContext<'_, '_>, expr: &Expr<'_>) {
106+
fn check_memory_fence(cx: &LateContext<'_>, expr: &Expr<'_>) {
107107
if_chain! {
108108
if let ExprKind::Call(ref func, ref args) = expr.kind;
109109
if let ExprKind::Path(ref func_qpath) = func.kind;
110-
if let Some(def_id) = cx.tables().qpath_res(func_qpath, func.hir_id).opt_def_id();
110+
if let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id();
111111
if ["fence", "compiler_fence"]
112112
.iter()
113113
.any(|func| match_def_path(cx, def_id, &["core", "sync", "atomic", func]));
114114
if let ExprKind::Path(ref ordering_qpath) = &args[0].kind;
115-
if let Some(ordering_def_id) = cx.tables().qpath_res(ordering_qpath, args[0].hir_id).opt_def_id();
115+
if let Some(ordering_def_id) = cx.qpath_res(ordering_qpath, args[0].hir_id).opt_def_id();
116116
if match_ordering_def_path(cx, ordering_def_id, &["Relaxed"]);
117117
then {
118118
span_lint_and_help(
@@ -127,8 +127,8 @@ fn check_memory_fence(cx: &LateContext<'_, '_>, expr: &Expr<'_>) {
127127
}
128128
}
129129

130-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AtomicOrdering {
131-
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
130+
impl<'tcx> LateLintPass<'tcx> for AtomicOrdering {
131+
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
132132
check_atomic_load_store(cx, expr);
133133
check_memory_fence(cx, expr);
134134
}

clippy_lints/src/attrs.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ declare_lint_pass!(Attributes => [
275275
BLANKET_CLIPPY_RESTRICTION_LINTS,
276276
]);
277277

278-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
279-
fn check_attribute(&mut self, cx: &LateContext<'a, 'tcx>, attr: &'tcx Attribute) {
278+
impl<'tcx> LateLintPass<'tcx> for Attributes {
279+
fn check_attribute(&mut self, cx: &LateContext<'tcx>, attr: &'tcx Attribute) {
280280
if let Some(items) = &attr.meta_item_list() {
281281
if let Some(ident) = attr.ident() {
282282
let ident = &*ident.as_str();
@@ -303,7 +303,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
303303
}
304304
}
305305

306-
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
306+
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
307307
if is_relevant_item(cx, item) {
308308
check_attrs(cx, item.span, item.ident.name, &item.attrs)
309309
}
@@ -375,20 +375,20 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
375375
}
376376
}
377377

378-
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem<'_>) {
378+
fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) {
379379
if is_relevant_impl(cx, item) {
380380
check_attrs(cx, item.span, item.ident.name, &item.attrs)
381381
}
382382
}
383383

384-
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem<'_>) {
384+
fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) {
385385
if is_relevant_trait(cx, item) {
386386
check_attrs(cx, item.span, item.ident.name, &item.attrs)
387387
}
388388
}
389389
}
390390

391-
fn check_clippy_lint_names(cx: &LateContext<'_, '_>, ident: &str, items: &[NestedMetaItem]) {
391+
fn check_clippy_lint_names(cx: &LateContext<'_>, ident: &str, items: &[NestedMetaItem]) {
392392
fn extract_name(lint: &NestedMetaItem) -> Option<SymbolStr> {
393393
if_chain! {
394394
if let Some(meta_item) = lint.meta_item();
@@ -455,22 +455,22 @@ fn check_clippy_lint_names(cx: &LateContext<'_, '_>, ident: &str, items: &[Neste
455455
}
456456
}
457457

458-
fn is_relevant_item(cx: &LateContext<'_, '_>, item: &Item<'_>) -> bool {
458+
fn is_relevant_item(cx: &LateContext<'_>, item: &Item<'_>) -> bool {
459459
if let ItemKind::Fn(_, _, eid) = item.kind {
460460
is_relevant_expr(cx, cx.tcx.body_tables(eid), &cx.tcx.hir().body(eid).value)
461461
} else {
462462
true
463463
}
464464
}
465465

466-
fn is_relevant_impl(cx: &LateContext<'_, '_>, item: &ImplItem<'_>) -> bool {
466+
fn is_relevant_impl(cx: &LateContext<'_>, item: &ImplItem<'_>) -> bool {
467467
match item.kind {
468468
ImplItemKind::Fn(_, eid) => is_relevant_expr(cx, cx.tcx.body_tables(eid), &cx.tcx.hir().body(eid).value),
469469
_ => false,
470470
}
471471
}
472472

473-
fn is_relevant_trait(cx: &LateContext<'_, '_>, item: &TraitItem<'_>) -> bool {
473+
fn is_relevant_trait(cx: &LateContext<'_>, item: &TraitItem<'_>) -> bool {
474474
match item.kind {
475475
TraitItemKind::Fn(_, TraitFn::Required(_)) => true,
476476
TraitItemKind::Fn(_, TraitFn::Provided(eid)) => {
@@ -480,7 +480,7 @@ fn is_relevant_trait(cx: &LateContext<'_, '_>, item: &TraitItem<'_>) -> bool {
480480
}
481481
}
482482

483-
fn is_relevant_block(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, block: &Block<'_>) -> bool {
483+
fn is_relevant_block(cx: &LateContext<'_>, tables: &ty::TypeckTables<'_>, block: &Block<'_>) -> bool {
484484
if let Some(stmt) = block.stmts.first() {
485485
match &stmt.kind {
486486
StmtKind::Local(_) => true,
@@ -492,7 +492,7 @@ fn is_relevant_block(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, bl
492492
}
493493
}
494494

495-
fn is_relevant_expr(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, expr: &Expr<'_>) -> bool {
495+
fn is_relevant_expr(cx: &LateContext<'_>, tables: &ty::TypeckTables<'_>, expr: &Expr<'_>) -> bool {
496496
match &expr.kind {
497497
ExprKind::Block(block, _) => is_relevant_block(cx, tables, block),
498498
ExprKind::Ret(Some(e)) => is_relevant_expr(cx, tables, e),
@@ -512,7 +512,7 @@ fn is_relevant_expr(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, exp
512512
}
513513
}
514514

515-
fn check_attrs(cx: &LateContext<'_, '_>, span: Span, name: Name, attrs: &[Attribute]) {
515+
fn check_attrs(cx: &LateContext<'_>, span: Span, name: Name, attrs: &[Attribute]) {
516516
if span.from_expansion() {
517517
return;
518518
}
@@ -537,7 +537,7 @@ fn check_attrs(cx: &LateContext<'_, '_>, span: Span, name: Name, attrs: &[Attrib
537537
}
538538
}
539539

540-
fn check_semver(cx: &LateContext<'_, '_>, span: Span, lit: &Lit) {
540+
fn check_semver(cx: &LateContext<'_>, span: Span, lit: &Lit) {
541541
if let LitKind::Str(is, _) = lit.kind {
542542
if Version::parse(&is.as_str()).is_ok() {
543543
return;

clippy_lints/src/await_holding_lock.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ declare_clippy_lint! {
5151

5252
declare_lint_pass!(AwaitHoldingLock => [AWAIT_HOLDING_LOCK]);
5353

54-
impl LateLintPass<'_, '_> for AwaitHoldingLock {
55-
fn check_body(&mut self, cx: &LateContext<'_, '_>, body: &'_ Body<'_>) {
54+
impl LateLintPass<'_> for AwaitHoldingLock {
55+
fn check_body(&mut self, cx: &LateContext<'_>, body: &'_ Body<'_>) {
5656
use AsyncGeneratorKind::{Block, Closure, Fn};
5757
if let Some(GeneratorKind::Async(Block | Closure | Fn)) = body.generator_kind {
5858
let body_id = BodyId {
@@ -65,7 +65,7 @@ impl LateLintPass<'_, '_> for AwaitHoldingLock {
6565
}
6666
}
6767

68-
fn check_interior_types(cx: &LateContext<'_, '_>, ty_causes: &[GeneratorInteriorTypeCause<'_>], span: Span) {
68+
fn check_interior_types(cx: &LateContext<'_>, ty_causes: &[GeneratorInteriorTypeCause<'_>], span: Span) {
6969
for ty_cause in ty_causes {
7070
if let rustc_middle::ty::Adt(adt, _) = ty_cause.ty.kind {
7171
if is_mutex_guard(cx, adt.did) {
@@ -82,7 +82,7 @@ fn check_interior_types(cx: &LateContext<'_, '_>, ty_causes: &[GeneratorInterior
8282
}
8383
}
8484

85-
fn is_mutex_guard(cx: &LateContext<'_, '_>, def_id: DefId) -> bool {
85+
fn is_mutex_guard(cx: &LateContext<'_>, def_id: DefId) -> bool {
8686
match_def_path(cx, def_id, &paths::MUTEX_GUARD)
8787
|| match_def_path(cx, def_id, &paths::RWLOCK_READ_GUARD)
8888
|| match_def_path(cx, def_id, &paths::RWLOCK_WRITE_GUARD)

clippy_lints/src/bit_mask.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ impl BitMask {
110110

111111
impl_lint_pass!(BitMask => [BAD_BIT_MASK, INEFFECTIVE_BIT_MASK, VERBOSE_BIT_MASK]);
112112

113-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BitMask {
114-
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, e: &'tcx Expr<'_>) {
113+
impl<'tcx> LateLintPass<'tcx> for BitMask {
114+
fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
115115
if let ExprKind::Binary(cmp, left, right) = &e.kind {
116116
if cmp.node.is_comparison() {
117117
if let Some(cmp_opt) = fetch_int_literal(cx, right) {
@@ -164,7 +164,7 @@ fn invert_cmp(cmp: BinOpKind) -> BinOpKind {
164164
}
165165
}
166166

167-
fn check_compare(cx: &LateContext<'_, '_>, bit_op: &Expr<'_>, cmp_op: BinOpKind, cmp_value: u128, span: Span) {
167+
fn check_compare(cx: &LateContext<'_>, bit_op: &Expr<'_>, cmp_op: BinOpKind, cmp_value: u128, span: Span) {
168168
if let ExprKind::Binary(op, left, right) = &bit_op.kind {
169169
if op.node != BinOpKind::BitAnd && op.node != BinOpKind::BitOr {
170170
return;
@@ -177,7 +177,7 @@ fn check_compare(cx: &LateContext<'_, '_>, bit_op: &Expr<'_>, cmp_op: BinOpKind,
177177

178178
#[allow(clippy::too_many_lines)]
179179
fn check_bit_mask(
180-
cx: &LateContext<'_, '_>,
180+
cx: &LateContext<'_>,
181181
bit_op: BinOpKind,
182182
cmp_op: BinOpKind,
183183
mask_value: u128,
@@ -290,7 +290,7 @@ fn check_bit_mask(
290290
}
291291
}
292292

293-
fn check_ineffective_lt(cx: &LateContext<'_, '_>, span: Span, m: u128, c: u128, op: &str) {
293+
fn check_ineffective_lt(cx: &LateContext<'_>, span: Span, m: u128, c: u128, op: &str) {
294294
if c.is_power_of_two() && m < c {
295295
span_lint(
296296
cx,
@@ -304,7 +304,7 @@ fn check_ineffective_lt(cx: &LateContext<'_, '_>, span: Span, m: u128, c: u128,
304304
}
305305
}
306306

307-
fn check_ineffective_gt(cx: &LateContext<'_, '_>, span: Span, m: u128, c: u128, op: &str) {
307+
fn check_ineffective_gt(cx: &LateContext<'_>, span: Span, m: u128, c: u128, op: &str) {
308308
if (c + 1).is_power_of_two() && m <= c {
309309
span_lint(
310310
cx,
@@ -318,7 +318,7 @@ fn check_ineffective_gt(cx: &LateContext<'_, '_>, span: Span, m: u128, c: u128,
318318
}
319319
}
320320

321-
fn fetch_int_literal(cx: &LateContext<'_, '_>, lit: &Expr<'_>) -> Option<u128> {
321+
fn fetch_int_literal(cx: &LateContext<'_>, lit: &Expr<'_>) -> Option<u128> {
322322
match constant(cx, cx.tables(), lit)?.0 {
323323
Constant::Int(n) => Some(n),
324324
_ => None,

clippy_lints/src/blacklisted_name.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ impl BlacklistedName {
3535

3636
impl_lint_pass!(BlacklistedName => [BLACKLISTED_NAME]);
3737

38-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlacklistedName {
39-
fn check_pat(&mut self, cx: &LateContext<'a, 'tcx>, pat: &'tcx Pat<'_>) {
38+
impl<'tcx> LateLintPass<'tcx> for BlacklistedName {
39+
fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) {
4040
if let PatKind::Binding(.., ident, _) = pat.kind {
4141
if self.blacklist.contains(&ident.name.to_string()) {
4242
span_lint(

0 commit comments

Comments
 (0)