Skip to content

Commit ae01c4a

Browse files
committed
Auto merge of #8190 - camsteffen:no-in-band-liftetimes, r=flip1995
Stop using `in_band_lifetimes` Per rust-lang/rust#91867 changelog: none
2 parents 0d94167 + 02ec39b commit ae01c4a

File tree

77 files changed

+216
-189
lines changed

Some content is hidden

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

77 files changed

+216
-189
lines changed

clippy_lints/src/bool_assert_comparison.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fn is_bool_lit(e: &Expr<'_>) -> bool {
4242
) && !e.span.from_expansion()
4343
}
4444

45-
fn is_impl_not_trait_with_bool_out(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) -> bool {
45+
fn is_impl_not_trait_with_bool_out(cx: &LateContext<'_>, e: &Expr<'_>) -> bool {
4646
let ty = cx.typeck_results().expr_ty(e);
4747

4848
cx.tcx

clippy_lints/src/case_sensitive_file_extension_comparisons.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn check_case_sensitive_file_extension_comparison(ctx: &LateContext<'_>, expr: &
6767
None
6868
}
6969

70-
impl LateLintPass<'tcx> for CaseSensitiveFileExtensionComparisons {
70+
impl<'tcx> LateLintPass<'tcx> for CaseSensitiveFileExtensionComparisons {
7171
fn check_expr(&mut self, ctx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) {
7272
if let Some(span) = check_case_sensitive_file_extension_comparison(ctx, expr) {
7373
span_lint_and_help(

clippy_lints/src/casts/cast_ptr_alignment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_span::symbol::sym;
99

1010
use super::CAST_PTR_ALIGNMENT;
1111

12-
pub(super) fn check(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
12+
pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>) {
1313
if let ExprKind::Cast(cast_expr, cast_to) = expr.kind {
1414
if is_hir_ty_cfg_dependant(cx, cast_to) {
1515
return;

clippy_lints/src/casts/cast_ref_to_mut.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_middle::ty;
66

77
use super::CAST_REF_TO_MUT;
88

9-
pub(super) fn check(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
9+
pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>) {
1010
if_chain! {
1111
if let ExprKind::Unary(UnOp::Deref, e) = &expr.kind;
1212
if let ExprKind::Cast(e, t) = &e.kind;

clippy_lints/src/casts/char_lit_as_u8.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_middle::ty::{self, UintTy};
99

1010
use super::CHAR_LIT_AS_U8;
1111

12-
pub(super) fn check(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
12+
pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>) {
1313
if_chain! {
1414
if let ExprKind::Cast(e, _) = &expr.kind;
1515
if let ExprKind::Lit(l) = &e.kind;

clippy_lints/src/casts/ptr_as_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rustc_semver::RustcVersion;
1212

1313
use super::PTR_AS_PTR;
1414

15-
pub(super) fn check(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, msrv: &Option<RustcVersion>) {
15+
pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, msrv: &Option<RustcVersion>) {
1616
if !meets_msrv(msrv.as_ref(), &msrvs::POINTER_CAST) {
1717
return;
1818
}

clippy_lints/src/copies.rs

+5-9
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ struct BlockEqual {
316316

317317
/// This function can also trigger the `IF_SAME_THEN_ELSE` in which case it'll return `None` to
318318
/// abort any further processing and avoid duplicate lint triggers.
319-
fn scan_block_for_eq(cx: &LateContext<'tcx>, blocks: &[&Block<'tcx>]) -> Option<BlockEqual> {
319+
fn scan_block_for_eq(cx: &LateContext<'_>, blocks: &[&Block<'_>]) -> Option<BlockEqual> {
320320
let mut start_eq = usize::MAX;
321321
let mut end_eq = usize::MAX;
322322
let mut expr_eq = true;
@@ -385,11 +385,7 @@ fn scan_block_for_eq(cx: &LateContext<'tcx>, blocks: &[&Block<'tcx>]) -> Option<
385385
})
386386
}
387387

388-
fn check_for_warn_of_moved_symbol(
389-
cx: &LateContext<'tcx>,
390-
symbols: &FxHashSet<Symbol>,
391-
if_expr: &'tcx Expr<'_>,
392-
) -> bool {
388+
fn check_for_warn_of_moved_symbol(cx: &LateContext<'_>, symbols: &FxHashSet<Symbol>, if_expr: &Expr<'_>) -> bool {
393389
get_enclosing_block(cx, if_expr.hir_id).map_or(false, |block| {
394390
let ignore_span = block.span.shrink_to_lo().to(if_expr.span);
395391

@@ -419,13 +415,13 @@ fn check_for_warn_of_moved_symbol(
419415
}
420416

421417
fn emit_branches_sharing_code_lint(
422-
cx: &LateContext<'tcx>,
418+
cx: &LateContext<'_>,
423419
start_stmts: usize,
424420
end_stmts: usize,
425421
lint_end: bool,
426422
warn_about_moved_symbol: bool,
427-
blocks: &[&Block<'tcx>],
428-
if_expr: &'tcx Expr<'_>,
423+
blocks: &[&Block<'_>],
424+
if_expr: &Expr<'_>,
429425
) {
430426
if start_stmts == 0 && !lint_end {
431427
return;

clippy_lints/src/default.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub struct Default {
7777

7878
impl_lint_pass!(Default => [DEFAULT_TRAIT_ACCESS, FIELD_REASSIGN_WITH_DEFAULT]);
7979

80-
impl LateLintPass<'_> for Default {
80+
impl<'tcx> LateLintPass<'tcx> for Default {
8181
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
8282
if_chain! {
8383
if !expr.span.from_expansion();
@@ -110,7 +110,7 @@ impl LateLintPass<'_> for Default {
110110
}
111111

112112
#[allow(clippy::too_many_lines)]
113-
fn check_block<'tcx>(&mut self, cx: &LateContext<'tcx>, block: &Block<'tcx>) {
113+
fn check_block(&mut self, cx: &LateContext<'tcx>, block: &Block<'tcx>) {
114114
// start from the `let mut _ = _::default();` and look at all the following
115115
// statements, see if they re-assign the fields of the binding
116116
let stmts_head = match block.stmts {

clippy_lints/src/default_numeric_fallback.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ declare_clippy_lint! {
5454

5555
declare_lint_pass!(DefaultNumericFallback => [DEFAULT_NUMERIC_FALLBACK]);
5656

57-
impl LateLintPass<'_> for DefaultNumericFallback {
57+
impl<'tcx> LateLintPass<'tcx> for DefaultNumericFallback {
5858
fn check_body(&mut self, cx: &LateContext<'tcx>, body: &'tcx Body<'_>) {
5959
let mut visitor = NumericFallbackVisitor::new(cx);
6060
visitor.visit_body(body);

clippy_lints/src/dereference.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ impl<'tcx> LateLintPass<'tcx> for Dereferencing {
355355
}
356356
}
357357

358-
fn try_parse_ref_op(
358+
fn try_parse_ref_op<'tcx>(
359359
tcx: TyCtxt<'tcx>,
360360
typeck: &'tcx TypeckResults<'_>,
361361
expr: &'tcx Expr<'_>,
@@ -387,7 +387,7 @@ fn try_parse_ref_op(
387387

388388
// Checks whether the type for a deref call actually changed the type, not just the mutability of
389389
// the reference.
390-
fn deref_method_same_type(result_ty: Ty<'tcx>, arg_ty: Ty<'tcx>) -> bool {
390+
fn deref_method_same_type(result_ty: Ty<'_>, arg_ty: Ty<'_>) -> bool {
391391
match (result_ty.kind(), arg_ty.kind()) {
392392
(ty::Ref(_, result_ty, _), ty::Ref(_, arg_ty, _)) => TyS::same_type(result_ty, arg_ty),
393393

@@ -457,7 +457,7 @@ fn is_linted_explicit_deref_position(parent: Option<Node<'_>>, child_id: HirId,
457457
}
458458

459459
/// Adjustments are sometimes made in the parent block rather than the expression itself.
460-
fn find_adjustments(
460+
fn find_adjustments<'tcx>(
461461
tcx: TyCtxt<'tcx>,
462462
typeck: &'tcx TypeckResults<'_>,
463463
expr: &'tcx Expr<'_>,
@@ -499,7 +499,7 @@ fn find_adjustments(
499499
}
500500

501501
#[allow(clippy::needless_pass_by_value)]
502-
fn report(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, state: State, data: StateData) {
502+
fn report(cx: &LateContext<'_>, expr: &Expr<'_>, state: State, data: StateData) {
503503
match state {
504504
State::DerefMethod {
505505
ty_changed_count,
@@ -568,7 +568,7 @@ fn report(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, state: State, data: Stat
568568
}
569569

570570
impl Dereferencing {
571-
fn check_local_usage(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>, local: HirId) {
571+
fn check_local_usage(&mut self, cx: &LateContext<'_>, e: &Expr<'_>, local: HirId) {
572572
if let Some(outer_pat) = self.ref_locals.get_mut(&local) {
573573
if let Some(pat) = outer_pat {
574574
// Check for auto-deref

clippy_lints/src/entry.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ struct ContainsExpr<'tcx> {
233233
key: &'tcx Expr<'tcx>,
234234
call_ctxt: SyntaxContext,
235235
}
236-
fn try_parse_contains(cx: &LateContext<'_>, expr: &'tcx Expr<'_>) -> Option<(MapType, ContainsExpr<'tcx>)> {
236+
fn try_parse_contains<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'_>) -> Option<(MapType, ContainsExpr<'tcx>)> {
237237
let mut negated = false;
238238
let expr = peel_hir_expr_while(expr, |e| match e.kind {
239239
ExprKind::Unary(UnOp::Not, e) => {
@@ -280,7 +280,7 @@ struct InsertExpr<'tcx> {
280280
key: &'tcx Expr<'tcx>,
281281
value: &'tcx Expr<'tcx>,
282282
}
283-
fn try_parse_insert(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<InsertExpr<'tcx>> {
283+
fn try_parse_insert<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<InsertExpr<'tcx>> {
284284
if let ExprKind::MethodCall(_, _, [map, key, value], _) = expr.kind {
285285
let id = cx.typeck_results().type_dependent_def_id(expr.hir_id)?;
286286
if match_def_path(cx, id, &paths::BTREEMAP_INSERT) || match_def_path(cx, id, &paths::HASHMAP_INSERT) {
@@ -301,7 +301,7 @@ enum Edit<'tcx> {
301301
/// An insertion into the map.
302302
Insertion(Insertion<'tcx>),
303303
}
304-
impl Edit<'tcx> {
304+
impl<'tcx> Edit<'tcx> {
305305
fn as_insertion(self) -> Option<Insertion<'tcx>> {
306306
if let Self::Insertion(i) = self { Some(i) } else { None }
307307
}
@@ -532,7 +532,7 @@ struct InsertSearchResults<'tcx> {
532532
allow_insert_closure: bool,
533533
is_single_insert: bool,
534534
}
535-
impl InsertSearchResults<'tcx> {
535+
impl<'tcx> InsertSearchResults<'tcx> {
536536
fn as_single_insertion(&self) -> Option<Insertion<'tcx>> {
537537
self.is_single_insert.then(|| self.edits[0].as_insertion().unwrap())
538538
}
@@ -633,7 +633,7 @@ impl InsertSearchResults<'tcx> {
633633
}
634634
}
635635

636-
fn find_insert_calls(
636+
fn find_insert_calls<'tcx>(
637637
cx: &LateContext<'tcx>,
638638
contains_expr: &ContainsExpr<'tcx>,
639639
expr: &'tcx Expr<'_>,

clippy_lints/src/equatable_if_let.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn unary_pattern(pat: &Pat<'_>) -> bool {
5656
}
5757
}
5858

59-
fn is_structural_partial_eq(cx: &LateContext<'tcx>, ty: Ty<'tcx>, other: Ty<'tcx>) -> bool {
59+
fn is_structural_partial_eq<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, other: Ty<'tcx>) -> bool {
6060
if let Some(def_id) = cx.tcx.lang_items().eq_trait() {
6161
implements_trait(cx, ty, def_id, &[other.into()])
6262
} else {

clippy_lints/src/erasing_op.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,19 @@ impl<'tcx> LateLintPass<'tcx> for ErasingOp {
5050
}
5151
}
5252

53-
fn different_types(tck: &TypeckResults<'tcx>, input: &'tcx Expr<'_>, output: &'tcx Expr<'_>) -> bool {
53+
fn different_types(tck: &TypeckResults<'_>, input: &Expr<'_>, output: &Expr<'_>) -> bool {
5454
let input_ty = tck.expr_ty(input).peel_refs();
5555
let output_ty = tck.expr_ty(output).peel_refs();
5656
!same_type_and_consts(input_ty, output_ty)
5757
}
5858

59-
fn check(cx: &LateContext<'cx>, tck: &TypeckResults<'cx>, op: &Expr<'cx>, other: &Expr<'cx>, parent: &Expr<'cx>) {
59+
fn check<'tcx>(
60+
cx: &LateContext<'tcx>,
61+
tck: &TypeckResults<'tcx>,
62+
op: &Expr<'tcx>,
63+
other: &Expr<'tcx>,
64+
parent: &Expr<'tcx>,
65+
) {
6066
if constant_simple(cx, tck, op) == Some(Constant::Int(0)) {
6167
if different_types(tck, other, parent) {
6268
return;

clippy_lints/src/from_over_into.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl FromOverInto {
5353

5454
impl_lint_pass!(FromOverInto => [FROM_OVER_INTO]);
5555

56-
impl LateLintPass<'_> for FromOverInto {
56+
impl<'tcx> LateLintPass<'tcx> for FromOverInto {
5757
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {
5858
if !meets_msrv(self.msrv.as_ref(), &msrvs::RE_REBALANCING_COHERENCE) {
5959
return;

clippy_lints/src/from_str_radix_10.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ declare_clippy_lint! {
4343

4444
declare_lint_pass!(FromStrRadix10 => [FROM_STR_RADIX_10]);
4545

46-
impl LateLintPass<'tcx> for FromStrRadix10 {
46+
impl<'tcx> LateLintPass<'tcx> for FromStrRadix10 {
4747
fn check_expr(&mut self, cx: &LateContext<'tcx>, exp: &Expr<'tcx>) {
4848
if_chain! {
4949
if let ExprKind::Call(maybe_path, arguments) = &exp.kind;

clippy_lints/src/functions/must_use.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use clippy_utils::{match_def_path, must_use_attr, return_ty, trait_ref_of_method
1818

1919
use super::{DOUBLE_MUST_USE, MUST_USE_CANDIDATE, MUST_USE_UNIT};
2020

21-
pub(super) fn check_item(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {
21+
pub(super) fn check_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {
2222
let attrs = cx.tcx.hir().attrs(item.hir_id());
2323
let attr = must_use_attr(attrs);
2424
if let hir::ItemKind::Fn(ref sig, ref _generics, ref body_id) = item.kind {
@@ -40,7 +40,7 @@ pub(super) fn check_item(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {
4040
}
4141
}
4242

43-
pub(super) fn check_impl_item(cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) {
43+
pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) {
4444
if let hir::ImplItemKind::Fn(ref sig, ref body_id) = item.kind {
4545
let is_public = cx.access_levels.is_exported(item.def_id);
4646
let fn_header_span = item.span.with_hi(sig.decl.output.span().hi());
@@ -62,7 +62,7 @@ pub(super) fn check_impl_item(cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<
6262
}
6363
}
6464

65-
pub(super) fn check_trait_item(cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) {
65+
pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) {
6666
if let hir::TraitItemKind::Fn(ref sig, ref eid) = item.kind {
6767
let is_public = cx.access_levels.is_exported(item.def_id);
6868
let fn_header_span = item.span.with_hi(sig.decl.output.span().hi());

clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use clippy_utils::{iter_input_pats, path_to_local};
99

1010
use super::NOT_UNSAFE_PTR_ARG_DEREF;
1111

12-
pub(super) fn check_fn(
12+
pub(super) fn check_fn<'tcx>(
1313
cx: &LateContext<'tcx>,
1414
kind: intravisit::FnKind<'tcx>,
1515
decl: &'tcx hir::FnDecl<'tcx>,
@@ -25,14 +25,14 @@ pub(super) fn check_fn(
2525
check_raw_ptr(cx, unsafety, decl, body, cx.tcx.hir().local_def_id(hir_id));
2626
}
2727

28-
pub(super) fn check_trait_item(cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) {
28+
pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) {
2929
if let hir::TraitItemKind::Fn(ref sig, hir::TraitFn::Provided(eid)) = item.kind {
3030
let body = cx.tcx.hir().body(eid);
3131
check_raw_ptr(cx, sig.header.unsafety, sig.decl, body, item.def_id);
3232
}
3333
}
3434

35-
fn check_raw_ptr(
35+
fn check_raw_ptr<'tcx>(
3636
cx: &LateContext<'tcx>,
3737
unsafety: hir::Unsafety,
3838
decl: &'tcx hir::FnDecl<'tcx>,

clippy_lints/src/functions/result_unit_err.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use clippy_utils::ty::is_type_diagnostic_item;
1313

1414
use super::RESULT_UNIT_ERR;
1515

16-
pub(super) fn check_item(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {
16+
pub(super) fn check_item(cx: &LateContext<'_>, item: &hir::Item<'_>) {
1717
if let hir::ItemKind::Fn(ref sig, ref _generics, _) = item.kind {
1818
let is_public = cx.access_levels.is_exported(item.def_id);
1919
let fn_header_span = item.span.with_hi(sig.decl.output.span().hi());
@@ -23,7 +23,7 @@ pub(super) fn check_item(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) {
2323
}
2424
}
2525

26-
pub(super) fn check_impl_item(cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) {
26+
pub(super) fn check_impl_item(cx: &LateContext<'_>, item: &hir::ImplItem<'_>) {
2727
if let hir::ImplItemKind::Fn(ref sig, _) = item.kind {
2828
let is_public = cx.access_levels.is_exported(item.def_id);
2929
let fn_header_span = item.span.with_hi(sig.decl.output.span().hi());
@@ -33,7 +33,7 @@ pub(super) fn check_impl_item(cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<
3333
}
3434
}
3535

36-
pub(super) fn check_trait_item(cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) {
36+
pub(super) fn check_trait_item(cx: &LateContext<'_>, item: &hir::TraitItem<'_>) {
3737
if let hir::TraitItemKind::Fn(ref sig, _) = item.kind {
3838
let is_public = cx.access_levels.is_exported(item.def_id);
3939
let fn_header_span = item.span.with_hi(sig.decl.output.span().hi());

clippy_lints/src/functions/too_many_arguments.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use clippy_utils::is_trait_impl_item;
99
use super::TOO_MANY_ARGUMENTS;
1010

1111
pub(super) fn check_fn(
12-
cx: &LateContext<'tcx>,
13-
kind: intravisit::FnKind<'tcx>,
14-
decl: &'tcx hir::FnDecl<'_>,
12+
cx: &LateContext<'_>,
13+
kind: intravisit::FnKind<'_>,
14+
decl: &hir::FnDecl<'_>,
1515
span: Span,
1616
hir_id: hir::HirId,
1717
too_many_arguments_threshold: u64,
@@ -39,11 +39,7 @@ pub(super) fn check_fn(
3939
}
4040
}
4141

42-
pub(super) fn check_trait_item(
43-
cx: &LateContext<'tcx>,
44-
item: &'tcx hir::TraitItem<'_>,
45-
too_many_arguments_threshold: u64,
46-
) {
42+
pub(super) fn check_trait_item(cx: &LateContext<'_>, item: &hir::TraitItem<'_>, too_many_arguments_threshold: u64) {
4743
if let hir::TraitItemKind::Fn(ref sig, _) = item.kind {
4844
// don't lint extern functions decls, it's not their fault
4945
if sig.header.abi == Abi::Rust {

clippy_lints/src/functions/too_many_lines.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ use super::TOO_MANY_LINES;
1111

1212
pub(super) fn check_fn(
1313
cx: &LateContext<'_>,
14-
kind: FnKind<'tcx>,
14+
kind: FnKind<'_>,
1515
span: Span,
16-
body: &'tcx hir::Body<'_>,
16+
body: &hir::Body<'_>,
1717
too_many_lines_threshold: u64,
1818
) {
1919
// Closures must be contained in a parent body, which will be checked for `too_many_lines`.

clippy_lints/src/if_then_some_else_none.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl IfThenSomeElseNone {
5555

5656
impl_lint_pass!(IfThenSomeElseNone => [IF_THEN_SOME_ELSE_NONE]);
5757

58-
impl LateLintPass<'_> for IfThenSomeElseNone {
58+
impl<'tcx> LateLintPass<'tcx> for IfThenSomeElseNone {
5959
fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'tcx Expr<'_>) {
6060
if !meets_msrv(self.msrv.as_ref(), &msrvs::BOOL_THEN) {
6161
return;

clippy_lints/src/implicit_return.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ fn get_call_site(span: Span, ctxt: SyntaxContext) -> Option<Span> {
9494
}
9595

9696
fn lint_implicit_returns(
97-
cx: &LateContext<'tcx>,
98-
expr: &'tcx Expr<'_>,
97+
cx: &LateContext<'_>,
98+
expr: &Expr<'_>,
9999
// The context of the function body.
100100
ctxt: SyntaxContext,
101101
// Whether the expression is from a macro expansion.

0 commit comments

Comments
 (0)