Skip to content

Commit 30c046e

Browse files
committed
Use 'tcx for references to AccessLevels wherever possible.
1 parent 590e07b commit 30c046e

File tree

156 files changed

+966
-1041
lines changed

Some content is hidden

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

156 files changed

+966
-1041
lines changed

clippy_lints/src/approx_const.rs

+4-4
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

+5-5
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

+3-3
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

+4-4
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

+6-6
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,13 +62,13 @@ 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();
@@ -103,7 +103,7 @@ 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;
@@ -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

+13-13
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ declare_lint_pass!(Attributes => [
251251
UNKNOWN_CLIPPY_LINTS,
252252
]);
253253

254-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
255-
fn check_attribute(&mut self, cx: &LateContext<'a, 'tcx>, attr: &'tcx Attribute) {
254+
impl<'tcx> LateLintPass<'tcx> for Attributes {
255+
fn check_attribute(&mut self, cx: &LateContext<'tcx>, attr: &'tcx Attribute) {
256256
if let Some(items) = &attr.meta_item_list() {
257257
if let Some(ident) = attr.ident() {
258258
match &*ident.as_str() {
@@ -278,7 +278,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
278278
}
279279
}
280280

281-
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
281+
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
282282
if is_relevant_item(cx, item) {
283283
check_attrs(cx, item.span, item.ident.name, &item.attrs)
284284
}
@@ -350,21 +350,21 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
350350
}
351351
}
352352

353-
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem<'_>) {
353+
fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) {
354354
if is_relevant_impl(cx, item) {
355355
check_attrs(cx, item.span, item.ident.name, &item.attrs)
356356
}
357357
}
358358

359-
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem<'_>) {
359+
fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) {
360360
if is_relevant_trait(cx, item) {
361361
check_attrs(cx, item.span, item.ident.name, &item.attrs)
362362
}
363363
}
364364
}
365365

366366
#[allow(clippy::single_match_else)]
367-
fn check_clippy_lint_names(cx: &LateContext<'_, '_>, items: &[NestedMetaItem]) {
367+
fn check_clippy_lint_names(cx: &LateContext<'_>, items: &[NestedMetaItem]) {
368368
let lint_store = cx.lints();
369369
for lint in items {
370370
if_chain! {
@@ -416,22 +416,22 @@ fn check_clippy_lint_names(cx: &LateContext<'_, '_>, items: &[NestedMetaItem]) {
416416
}
417417
}
418418

419-
fn is_relevant_item(cx: &LateContext<'_, '_>, item: &Item<'_>) -> bool {
419+
fn is_relevant_item(cx: &LateContext<'_>, item: &Item<'_>) -> bool {
420420
if let ItemKind::Fn(_, _, eid) = item.kind {
421421
is_relevant_expr(cx, cx.tcx.body_tables(eid), &cx.tcx.hir().body(eid).value)
422422
} else {
423423
true
424424
}
425425
}
426426

427-
fn is_relevant_impl(cx: &LateContext<'_, '_>, item: &ImplItem<'_>) -> bool {
427+
fn is_relevant_impl(cx: &LateContext<'_>, item: &ImplItem<'_>) -> bool {
428428
match item.kind {
429429
ImplItemKind::Fn(_, eid) => is_relevant_expr(cx, cx.tcx.body_tables(eid), &cx.tcx.hir().body(eid).value),
430430
_ => false,
431431
}
432432
}
433433

434-
fn is_relevant_trait(cx: &LateContext<'_, '_>, item: &TraitItem<'_>) -> bool {
434+
fn is_relevant_trait(cx: &LateContext<'_>, item: &TraitItem<'_>) -> bool {
435435
match item.kind {
436436
TraitItemKind::Fn(_, TraitFn::Required(_)) => true,
437437
TraitItemKind::Fn(_, TraitFn::Provided(eid)) => {
@@ -441,7 +441,7 @@ fn is_relevant_trait(cx: &LateContext<'_, '_>, item: &TraitItem<'_>) -> bool {
441441
}
442442
}
443443

444-
fn is_relevant_block(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, block: &Block<'_>) -> bool {
444+
fn is_relevant_block(cx: &LateContext<'_>, tables: &ty::TypeckTables<'_>, block: &Block<'_>) -> bool {
445445
if let Some(stmt) = block.stmts.first() {
446446
match &stmt.kind {
447447
StmtKind::Local(_) => true,
@@ -453,7 +453,7 @@ fn is_relevant_block(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, bl
453453
}
454454
}
455455

456-
fn is_relevant_expr(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, expr: &Expr<'_>) -> bool {
456+
fn is_relevant_expr(cx: &LateContext<'_>, tables: &ty::TypeckTables<'_>, expr: &Expr<'_>) -> bool {
457457
match &expr.kind {
458458
ExprKind::Block(block, _) => is_relevant_block(cx, tables, block),
459459
ExprKind::Ret(Some(e)) => is_relevant_expr(cx, tables, e),
@@ -473,7 +473,7 @@ fn is_relevant_expr(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, exp
473473
}
474474
}
475475

476-
fn check_attrs(cx: &LateContext<'_, '_>, span: Span, name: Name, attrs: &[Attribute]) {
476+
fn check_attrs(cx: &LateContext<'_>, span: Span, name: Name, attrs: &[Attribute]) {
477477
if span.from_expansion() {
478478
return;
479479
}
@@ -498,7 +498,7 @@ fn check_attrs(cx: &LateContext<'_, '_>, span: Span, name: Name, attrs: &[Attrib
498498
}
499499
}
500500

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

clippy_lints/src/await_holding_lock.rs

+4-4
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

+7-7
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

+2-2
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(

clippy_lints/src/blocks_in_if_conditions.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ declare_lint_pass!(BlocksInIfConditions => [BLOCKS_IN_IF_CONDITIONS]);
4545

4646
struct ExVisitor<'a, 'tcx> {
4747
found_block: Option<&'tcx Expr<'tcx>>,
48-
cx: &'a LateContext<'a, 'tcx>,
48+
cx: &'a LateContext<'tcx>,
4949
}
5050

5151
impl<'a, 'tcx> Visitor<'tcx> for ExVisitor<'a, 'tcx> {
@@ -71,8 +71,8 @@ const BRACED_EXPR_MESSAGE: &str = "omit braces around single expression conditio
7171
const COMPLEX_BLOCK_MESSAGE: &str = "in an `if` condition, avoid complex blocks or closures with blocks; \
7272
instead, move the block or closure higher and bind it with a `let`";
7373

74-
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BlocksInIfConditions {
75-
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
74+
impl<'tcx> LateLintPass<'tcx> for BlocksInIfConditions {
75+
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
7676
if in_external_macro(cx.sess(), expr.span) {
7777
return;
7878
}

0 commit comments

Comments
 (0)