@@ -212,7 +212,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
212
212
for item in items {
213
213
if_chain ! {
214
214
if let NestedMetaItem :: MetaItem ( mi) = & item;
215
- if let MetaItemKind :: NameValue ( lit) = & mi. node ;
215
+ if let MetaItemKind :: NameValue ( lit) = & mi. kind ;
216
216
if mi. check_name( sym!( since) ) ;
217
217
then {
218
218
check_semver( cx, item. span( ) , lit) ;
@@ -227,7 +227,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
227
227
if is_relevant_item ( cx, item) {
228
228
check_attrs ( cx, item. span , item. ident . name , & item. attrs )
229
229
}
230
- match item. node {
230
+ match item. kind {
231
231
ItemKind :: ExternCrate ( ..) | ItemKind :: Use ( ..) => {
232
232
let skip_unused_imports = item. attrs . iter ( ) . any ( |attr| attr. check_name ( sym ! ( macro_use) ) ) ;
233
233
@@ -242,7 +242,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Attributes {
242
242
// whitelist `unused_imports`, `deprecated` and `unreachable_pub` for `use` items
243
243
// and `unused_imports` for `extern crate` items with `macro_use`
244
244
for lint in lint_list {
245
- match item. node {
245
+ match item. kind {
246
246
ItemKind :: Use ( ..) => {
247
247
if is_word ( lint, sym ! ( unused_imports) )
248
248
|| is_word ( lint, sym ! ( deprecated) )
@@ -355,22 +355,22 @@ fn check_clippy_lint_names(cx: &LateContext<'_, '_>, items: &[NestedMetaItem]) {
355
355
}
356
356
357
357
fn is_relevant_item ( cx : & LateContext < ' _ , ' _ > , item : & Item ) -> bool {
358
- if let ItemKind :: Fn ( _, _, _, eid) = item. node {
358
+ if let ItemKind :: Fn ( _, _, _, eid) = item. kind {
359
359
is_relevant_expr ( cx, cx. tcx . body_tables ( eid) , & cx. tcx . hir ( ) . body ( eid) . value )
360
360
} else {
361
361
true
362
362
}
363
363
}
364
364
365
365
fn is_relevant_impl ( cx : & LateContext < ' _ , ' _ > , item : & ImplItem ) -> bool {
366
- match item. node {
366
+ match item. kind {
367
367
ImplItemKind :: Method ( _, eid) => is_relevant_expr ( cx, cx. tcx . body_tables ( eid) , & cx. tcx . hir ( ) . body ( eid) . value ) ,
368
368
_ => false ,
369
369
}
370
370
}
371
371
372
372
fn is_relevant_trait ( cx : & LateContext < ' _ , ' _ > , item : & TraitItem ) -> bool {
373
- match item. node {
373
+ match item. kind {
374
374
TraitItemKind :: Method ( _, TraitMethod :: Required ( _) ) => true ,
375
375
TraitItemKind :: Method ( _, TraitMethod :: Provided ( eid) ) => {
376
376
is_relevant_expr ( cx, cx. tcx . body_tables ( eid) , & cx. tcx . hir ( ) . body ( eid) . value )
@@ -381,7 +381,7 @@ fn is_relevant_trait(cx: &LateContext<'_, '_>, item: &TraitItem) -> bool {
381
381
382
382
fn is_relevant_block ( cx : & LateContext < ' _ , ' _ > , tables : & ty:: TypeckTables < ' _ > , block : & Block ) -> bool {
383
383
if let Some ( stmt) = block. stmts . first ( ) {
384
- match & stmt. node {
384
+ match & stmt. kind {
385
385
StmtKind :: Local ( _) => true ,
386
386
StmtKind :: Expr ( expr) | StmtKind :: Semi ( expr) => is_relevant_expr ( cx, tables, expr) ,
387
387
_ => false ,
@@ -392,12 +392,12 @@ fn is_relevant_block(cx: &LateContext<'_, '_>, tables: &ty::TypeckTables<'_>, bl
392
392
}
393
393
394
394
fn is_relevant_expr ( cx : & LateContext < ' _ , ' _ > , tables : & ty:: TypeckTables < ' _ > , expr : & Expr ) -> bool {
395
- match & expr. node {
395
+ match & expr. kind {
396
396
ExprKind :: Block ( block, _) => is_relevant_block ( cx, tables, block) ,
397
397
ExprKind :: Ret ( Some ( e) ) => is_relevant_expr ( cx, tables, e) ,
398
398
ExprKind :: Ret ( None ) | ExprKind :: Break ( _, None ) => false ,
399
399
ExprKind :: Call ( path_expr, _) => {
400
- if let ExprKind :: Path ( qpath) = & path_expr. node {
400
+ if let ExprKind :: Path ( qpath) = & path_expr. kind {
401
401
if let Some ( fun_id) = tables. qpath_res ( qpath, path_expr. hir_id ) . opt_def_id ( ) {
402
402
!match_def_path ( cx, fun_id, & paths:: BEGIN_PANIC )
403
403
} else {
@@ -464,7 +464,7 @@ fn check_attrs(cx: &LateContext<'_, '_>, span: Span, name: Name, attrs: &[Attrib
464
464
}
465
465
466
466
fn check_semver ( cx : & LateContext < ' _ , ' _ > , span : Span , lit : & Lit ) {
467
- if let LitKind :: Str ( is, _) = lit. node {
467
+ if let LitKind :: Str ( is, _) = lit. kind {
468
468
if Version :: parse ( & is. as_str ( ) ) . is_ok ( ) {
469
469
return ;
470
470
}
0 commit comments