Skip to content

Commit 6d12259

Browse files
committed
Auto merge of #4938 - flip1995:rustup, r=flip1995
Rustup to rust-lang/rust#66931 changelog: none
2 parents 8723eb6 + f6a5b60 commit 6d12259

Some content is hidden

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

46 files changed

+117
-117
lines changed

clippy_lints/src/arithmetic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
113113
}
114114
}
115115

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

119119
match cx.tcx.hir().body_owner_kind(body_owner) {
@@ -131,7 +131,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Arithmetic {
131131
}
132132
}
133133

134-
fn check_body_post(&mut self, cx: &LateContext<'_, '_>, body: &hir::Body) {
134+
fn check_body_post(&mut self, cx: &LateContext<'_, '_>, body: &hir::Body<'_>) {
135135
let body_owner = cx.tcx.hir().body_owner(body.id());
136136
let body_span = cx.tcx.hir().span(body_owner);
137137

clippy_lints/src/attrs.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
224224
}
225225
}
226226

227-
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
227+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
228228
if is_relevant_item(cx, item) {
229229
check_attrs(cx, item.span, item.ident.name, &item.attrs)
230230
}
231231
match item.kind {
232232
ItemKind::ExternCrate(..) | ItemKind::Use(..) => {
233233
let skip_unused_imports = item.attrs.iter().any(|attr| attr.check_name(sym!(macro_use)));
234234

235-
for attr in &item.attrs {
235+
for attr in item.attrs {
236236
if in_external_macro(cx.sess(), attr.span) {
237237
return;
238238
}
@@ -295,13 +295,13 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
295295
}
296296
}
297297

298-
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem) {
298+
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem<'_>) {
299299
if is_relevant_impl(cx, item) {
300300
check_attrs(cx, item.span, item.ident.name, &item.attrs)
301301
}
302302
}
303303

304-
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem) {
304+
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem<'_>) {
305305
if is_relevant_trait(cx, item) {
306306
check_attrs(cx, item.span, item.ident.name, &item.attrs)
307307
}
@@ -355,22 +355,22 @@ fn check_clippy_lint_names(cx: &LateContext<'_, '_>, items: &[NestedMetaItem]) {
355355
}
356356
}
357357

358-
fn is_relevant_item(cx: &LateContext<'_, '_>, item: &Item) -> bool {
358+
fn is_relevant_item(cx: &LateContext<'_, '_>, item: &Item<'_>) -> bool {
359359
if let ItemKind::Fn(_, _, eid) = item.kind {
360360
is_relevant_expr(cx, cx.tcx.body_tables(eid), &cx.tcx.hir().body(eid).value)
361361
} else {
362362
true
363363
}
364364
}
365365

366-
fn is_relevant_impl(cx: &LateContext<'_, '_>, item: &ImplItem) -> bool {
366+
fn is_relevant_impl(cx: &LateContext<'_, '_>, item: &ImplItem<'_>) -> bool {
367367
match item.kind {
368368
ImplItemKind::Method(_, eid) => is_relevant_expr(cx, cx.tcx.body_tables(eid), &cx.tcx.hir().body(eid).value),
369369
_ => false,
370370
}
371371
}
372372

373-
fn is_relevant_trait(cx: &LateContext<'_, '_>, item: &TraitItem) -> bool {
373+
fn is_relevant_trait(cx: &LateContext<'_, '_>, item: &TraitItem<'_>) -> bool {
374374
match item.kind {
375375
TraitItemKind::Method(_, TraitMethod::Required(_)) => true,
376376
TraitItemKind::Method(_, TraitMethod::Provided(eid)) => {

clippy_lints/src/booleans.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonminimalBool {
6161
cx: &LateContext<'a, 'tcx>,
6262
_: intravisit::FnKind<'tcx>,
6363
_: &'tcx FnDecl,
64-
body: &'tcx Body,
64+
body: &'tcx Body<'_>,
6565
_: Span,
6666
_: HirId,
6767
) {

clippy_lints/src/cognitive_complexity.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl CognitiveComplexity {
4848
cx: &'a LateContext<'a, 'tcx>,
4949
kind: FnKind<'tcx>,
5050
decl: &'tcx FnDecl,
51-
body: &'tcx Body,
51+
body: &'tcx Body<'_>,
5252
body_span: Span,
5353
) {
5454
if body_span.from_expansion() {
@@ -117,7 +117,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CognitiveComplexity {
117117
cx: &LateContext<'a, 'tcx>,
118118
kind: FnKind<'tcx>,
119119
decl: &'tcx FnDecl,
120-
body: &'tcx Body,
120+
body: &'tcx Body<'_>,
121121
span: Span,
122122
hir_id: HirId,
123123
) {

clippy_lints/src/copy_iterator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ declare_clippy_lint! {
3333
declare_lint_pass!(CopyIterator => [COPY_ITERATOR]);
3434

3535
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CopyIterator {
36-
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
36+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
3737
if let ItemKind::Impl(_, _, _, _, Some(ref trait_ref), _, _) = item.kind {
3838
let ty = cx.tcx.type_of(cx.tcx.hir().local_def_id(item.hir_id));
3939

clippy_lints/src/derive.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ declare_clippy_lint! {
6666
declare_lint_pass!(Derive => [EXPL_IMPL_CLONE_ON_COPY, DERIVE_HASH_XOR_EQ]);
6767

6868
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Derive {
69-
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
69+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
7070
if let ItemKind::Impl(_, _, _, _, Some(ref trait_ref), _, _) = item.kind {
7171
let ty = cx.tcx.type_of(cx.tcx.hir().local_def_id(item.hir_id));
7272
let is_automatically_derived = is_automatically_derived(&*item.attrs);
@@ -130,7 +130,7 @@ fn check_hash_peq<'a, 'tcx>(
130130
}
131131

132132
/// Implementation of the `EXPL_IMPL_CLONE_ON_COPY` lint.
133-
fn check_copy_clone<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, item: &Item, trait_ref: &TraitRef, ty: Ty<'tcx>) {
133+
fn check_copy_clone<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, item: &Item<'_>, trait_ref: &TraitRef, ty: Ty<'tcx>) {
134134
if match_path(&trait_ref.path, &paths::CLONE_TRAIT) {
135135
if !is_copy(cx, ty) {
136136
return;

clippy_lints/src/doc.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ impl DocMarkdown {
146146
impl_lint_pass!(DocMarkdown => [DOC_MARKDOWN, MISSING_SAFETY_DOC, MISSING_ERRORS_DOC, NEEDLESS_DOCTEST_MAIN]);
147147

148148
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DocMarkdown {
149-
fn check_crate(&mut self, cx: &LateContext<'a, 'tcx>, krate: &'tcx hir::Crate) {
149+
fn check_crate(&mut self, cx: &LateContext<'a, 'tcx>, krate: &'tcx hir::Crate<'_>) {
150150
check_attrs(cx, &self.valid_idents, &krate.attrs);
151151
}
152152

153-
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::Item) {
153+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::Item<'_>) {
154154
let headers = check_attrs(cx, &self.valid_idents, &item.attrs);
155155
match item.kind {
156156
hir::ItemKind::Fn(ref sig, ..) => {
@@ -163,20 +163,20 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DocMarkdown {
163163
}
164164
}
165165

166-
fn check_item_post(&mut self, _cx: &LateContext<'a, 'tcx>, item: &'tcx hir::Item) {
166+
fn check_item_post(&mut self, _cx: &LateContext<'a, 'tcx>, item: &'tcx hir::Item<'_>) {
167167
if let hir::ItemKind::Impl(..) = item.kind {
168168
self.in_trait_impl = false;
169169
}
170170
}
171171

172-
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::TraitItem) {
172+
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::TraitItem<'_>) {
173173
let headers = check_attrs(cx, &self.valid_idents, &item.attrs);
174174
if let hir::TraitItemKind::Method(ref sig, ..) = item.kind {
175175
lint_for_missing_headers(cx, item.hir_id, item.span, sig, headers);
176176
}
177177
}
178178

179-
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::ImplItem) {
179+
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::ImplItem<'_>) {
180180
let headers = check_attrs(cx, &self.valid_idents, &item.attrs);
181181
if self.in_trait_impl {
182182
return;

clippy_lints/src/empty_enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ declare_clippy_lint! {
2727
declare_lint_pass!(EmptyEnum => [EMPTY_ENUM]);
2828

2929
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EmptyEnum {
30-
fn check_item(&mut self, cx: &LateContext<'_, '_>, item: &Item) {
30+
fn check_item(&mut self, cx: &LateContext<'_, '_>, item: &Item<'_>) {
3131
let did = cx.tcx.hir().local_def_id(item.hir_id);
3232
if let ItemKind::Enum(..) = item.kind {
3333
let ty = cx.tcx.type_of(did);

clippy_lints/src/enum_clike.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ declare_lint_pass!(UnportableVariant => [ENUM_CLIKE_UNPORTABLE_VARIANT]);
4141

4242
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
4343
#[allow(clippy::cast_possible_truncation, clippy::cast_possible_wrap, clippy::cast_sign_loss)]
44-
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
44+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
4545
if cx.tcx.data_layout.pointer_size.bits() != 64 {
4646
return;
4747
}
4848
if let ItemKind::Enum(def, _) = &item.kind {
49-
for var in &def.variants {
49+
for var in def.variants {
5050
if let Some(anon_const) = &var.disr_expr {
5151
let param_env = ty::ParamEnv::empty();
5252
let def_id = cx.tcx.hir().body_owner_def_id(anon_const.body);

clippy_lints/src/enum_glob_use.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ declare_clippy_lint! {
2929
declare_lint_pass!(EnumGlobUse => [ENUM_GLOB_USE]);
3030

3131
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse {
32-
fn check_mod(&mut self, cx: &LateContext<'a, 'tcx>, m: &'tcx Mod, _: Span, _: HirId) {
32+
fn check_mod(&mut self, cx: &LateContext<'a, 'tcx>, m: &'tcx Mod<'_>, _: Span, _: HirId) {
3333
let map = cx.tcx.hir();
3434
// only check top level `use` statements
35-
for item in &m.item_ids {
35+
for item in m.item_ids {
3636
lint_item(cx, map.expect_item(item.id));
3737
}
3838
}
3939
}
4040

41-
fn lint_item(cx: &LateContext<'_, '_>, item: &Item) {
41+
fn lint_item(cx: &LateContext<'_, '_>, item: &Item<'_>) {
4242
if item.vis.node.is_pub() {
4343
return; // re-exports are fine
4444
}

clippy_lints/src/escape.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoxedLocal {
5656
cx: &LateContext<'a, 'tcx>,
5757
_: visit::FnKind<'tcx>,
5858
_: &'tcx FnDecl,
59-
body: &'tcx Body,
59+
body: &'tcx Body<'_>,
6060
_: Span,
6161
hir_id: HirId,
6262
) {

clippy_lints/src/fallible_impl_from.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ declare_clippy_lint! {
3232
declare_lint_pass!(FallibleImplFrom => [FALLIBLE_IMPL_FROM]);
3333

3434
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for FallibleImplFrom {
35-
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::Item) {
35+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::Item<'_>) {
3636
// check for `impl From<???> for ..`
3737
let impl_def_id = cx.tcx.hir().local_def_id(item.hir_id);
3838
if_chain! {
39-
if let hir::ItemKind::Impl(.., ref impl_items) = item.kind;
39+
if let hir::ItemKind::Impl(.., impl_items) = item.kind;
4040
if let Some(impl_trait_ref) = cx.tcx.impl_trait_ref(impl_def_id);
4141
if match_def_path(cx, impl_trait_ref.def_id, &FROM_TRAIT);
4242
then {
@@ -46,7 +46,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for FallibleImplFrom {
4646
}
4747
}
4848

49-
fn lint_impl_body<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, impl_span: Span, impl_items: &hir::HirVec<hir::ImplItemRef>) {
49+
fn lint_impl_body<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, impl_span: Span, impl_items: &[hir::ImplItemRef]) {
5050
use rustc::hir::intravisit::{self, NestedVisitorMap, Visitor};
5151
use rustc::hir::*;
5252

clippy_lints/src/functions.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
187187
cx: &LateContext<'a, 'tcx>,
188188
kind: intravisit::FnKind<'tcx>,
189189
decl: &'tcx hir::FnDecl,
190-
body: &'tcx hir::Body,
190+
body: &'tcx hir::Body<'_>,
191191
span: Span,
192192
hir_id: hir::HirId,
193193
) {
@@ -227,7 +227,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
227227
self.check_line_number(cx, span, body);
228228
}
229229

230-
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::Item) {
230+
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::Item<'_>) {
231231
let attr = must_use_attr(&item.attrs);
232232
if let hir::ItemKind::Fn(ref sig, ref _generics, ref body_id) = item.kind {
233233
if let Some(attr) = attr {
@@ -249,7 +249,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
249249
}
250250
}
251251

252-
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::ImplItem) {
252+
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::ImplItem<'_>) {
253253
if let hir::ImplItemKind::Method(ref sig, ref body_id) = item.kind {
254254
let attr = must_use_attr(&item.attrs);
255255
if let Some(attr) = attr {
@@ -272,7 +272,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
272272
}
273273
}
274274

275-
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::TraitItem) {
275+
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx hir::TraitItem<'_>) {
276276
if let hir::TraitItemKind::Method(ref sig, ref eid) = item.kind {
277277
// don't lint extern functions decls, it's not their fault
278278
if sig.header.abi == Abi::Rust {
@@ -317,7 +317,7 @@ impl<'a, 'tcx> Functions {
317317
}
318318
}
319319

320-
fn check_line_number(self, cx: &LateContext<'_, '_>, span: Span, body: &'tcx hir::Body) {
320+
fn check_line_number(self, cx: &LateContext<'_, '_>, span: Span, body: &'tcx hir::Body<'_>) {
321321
if in_external_macro(cx.sess(), span) {
322322
return;
323323
}
@@ -375,7 +375,7 @@ impl<'a, 'tcx> Functions {
375375
cx: &LateContext<'a, 'tcx>,
376376
unsafety: hir::Unsafety,
377377
decl: &'tcx hir::FnDecl,
378-
body: &'tcx hir::Body,
378+
body: &'tcx hir::Body<'_>,
379379
hir_id: hir::HirId,
380380
) {
381381
let expr = &body.value;
@@ -439,7 +439,7 @@ fn check_needless_must_use(
439439
fn check_must_use_candidate<'a, 'tcx>(
440440
cx: &LateContext<'a, 'tcx>,
441441
decl: &'tcx hir::FnDecl,
442-
body: &'tcx hir::Body,
442+
body: &'tcx hir::Body<'_>,
443443
item_span: Span,
444444
item_id: hir::HirId,
445445
fn_span: Span,
@@ -521,7 +521,7 @@ fn is_must_use_ty<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>) -> bool {
521521
}
522522
}
523523

524-
fn has_mutable_arg(cx: &LateContext<'_, '_>, body: &hir::Body) -> bool {
524+
fn has_mutable_arg(cx: &LateContext<'_, '_>, body: &hir::Body<'_>) -> bool {
525525
let mut tys = FxHashSet::default();
526526
body.params.iter().any(|param| is_mutable_pat(cx, &param.pat, &mut tys))
527527
}
@@ -686,7 +686,7 @@ fn is_mutated_static(cx: &LateContext<'_, '_>, e: &hir::Expr) -> bool {
686686
}
687687
}
688688

689-
fn mutates_static<'a, 'tcx>(cx: &'a LateContext<'a, 'tcx>, body: &'tcx hir::Body) -> bool {
689+
fn mutates_static<'a, 'tcx>(cx: &'a LateContext<'a, 'tcx>, body: &'tcx hir::Body<'_>) -> bool {
690690
let mut v = StaticMutVisitor {
691691
cx,
692692
mutates_static: false,

clippy_lints/src/implicit_return.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ImplicitReturn {
130130
cx: &LateContext<'a, 'tcx>,
131131
_: FnKind<'tcx>,
132132
_: &'tcx FnDecl,
133-
body: &'tcx Body,
133+
body: &'tcx Body<'_>,
134134
span: Span,
135135
_: HirId,
136136
) {

clippy_lints/src/inherent_impl.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub struct MultipleInherentImpl {
4949
impl_lint_pass!(MultipleInherentImpl => [MULTIPLE_INHERENT_IMPL]);
5050

5151
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MultipleInherentImpl {
52-
fn check_item(&mut self, _: &LateContext<'a, 'tcx>, item: &'tcx Item) {
52+
fn check_item(&mut self, _: &LateContext<'a, 'tcx>, item: &'tcx Item<'_>) {
5353
if let ItemKind::Impl(_, _, _, ref generics, None, _, _) = item.kind {
5454
// Remember for each inherent implementation encoutered its span and generics
5555
// but filter out implementations that have generic params (type or lifetime)
@@ -60,7 +60,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MultipleInherentImpl {
6060
}
6161
}
6262

63-
fn check_crate_post(&mut self, cx: &LateContext<'a, 'tcx>, krate: &'tcx Crate) {
63+
fn check_crate_post(&mut self, cx: &LateContext<'a, 'tcx>, krate: &'tcx Crate<'_>) {
6464
if let Some(item) = krate.items.values().nth(0) {
6565
// Retrieve all inherent implementations from the crate, grouped by type
6666
for impls in cx

clippy_lints/src/inherent_to_string.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ declare_clippy_lint! {
9494
declare_lint_pass!(InherentToString => [INHERENT_TO_STRING, INHERENT_TO_STRING_SHADOW_DISPLAY]);
9595

9696
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InherentToString {
97-
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, impl_item: &'tcx ImplItem) {
97+
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, impl_item: &'tcx ImplItem<'_>) {
9898
if impl_item.span.from_expansion() {
9999
return;
100100
}
@@ -120,7 +120,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InherentToString {
120120
}
121121
}
122122

123-
fn show_lint(cx: &LateContext<'_, '_>, item: &ImplItem) {
123+
fn show_lint(cx: &LateContext<'_, '_>, item: &ImplItem<'_>) {
124124
let display_trait_id =
125125
get_trait_def_id(cx, &["core", "fmt", "Display"]).expect("Failed to get trait ID of `Display`!");
126126

clippy_lints/src/inline_fn_without_body.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ declare_clippy_lint! {
3232
declare_lint_pass!(InlineFnWithoutBody => [INLINE_FN_WITHOUT_BODY]);
3333

3434
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for InlineFnWithoutBody {
35-
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem) {
35+
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem<'_>) {
3636
if let TraitItemKind::Method(_, TraitMethod::Required(_)) = item.kind {
3737
check_attrs(cx, item.ident.name, &item.attrs);
3838
}

clippy_lints/src/large_enum_variant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl LargeEnumVariant {
4747
impl_lint_pass!(LargeEnumVariant => [LARGE_ENUM_VARIANT]);
4848

4949
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LargeEnumVariant {
50-
fn check_item(&mut self, cx: &LateContext<'_, '_>, item: &Item) {
50+
fn check_item(&mut self, cx: &LateContext<'_, '_>, item: &Item<'_>) {
5151
let did = cx.tcx.hir().local_def_id(item.hir_id);
5252
if let ItemKind::Enum(ref def, _) = item.kind {
5353
let ty = cx.tcx.type_of(did);

0 commit comments

Comments
 (0)