@@ -312,7 +312,7 @@ fn type_param_predicates(
312
312
}
313
313
}
314
314
315
- Node :: ForeignItem ( item) => match item. node {
315
+ Node :: ForeignItem ( item) => match item. kind {
316
316
ForeignItemKind :: Fn ( _, _, ref generics) => generics,
317
317
_ => return result,
318
318
} ,
@@ -415,7 +415,7 @@ fn convert_item(tcx: TyCtxt<'_>, item_id: hir::HirId) {
415
415
tcx. generics_of ( def_id) ;
416
416
tcx. type_of ( def_id) ;
417
417
tcx. predicates_of ( def_id) ;
418
- if let hir:: ForeignItemKind :: Fn ( ..) = item. node {
418
+ if let hir:: ForeignItemKind :: Fn ( ..) = item. kind {
419
419
tcx. fn_sig ( def_id) ;
420
420
}
421
421
}
@@ -872,7 +872,7 @@ fn has_late_bound_regions<'tcx>(tcx: TyCtxt<'tcx>, node: Node<'tcx>) -> Option<S
872
872
}
873
873
_ => None ,
874
874
} ,
875
- Node :: ForeignItem ( item) => match item. node {
875
+ Node :: ForeignItem ( item) => match item. kind {
876
876
hir:: ForeignItemKind :: Fn ( ref fn_decl, _, ref generics) => {
877
877
has_late_bound_regions ( tcx, generics, fn_decl)
878
878
}
@@ -977,7 +977,7 @@ fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::Generics {
977
977
}
978
978
}
979
979
980
- Node :: ForeignItem ( item) => match item. node {
980
+ Node :: ForeignItem ( item) => match item. kind {
981
981
ForeignItemKind :: Static ( ..) => & no_generics,
982
982
ForeignItemKind :: Fn ( _, _, ref generics) => generics,
983
983
ForeignItemKind :: Type => & no_generics,
@@ -1331,7 +1331,7 @@ pub fn checked_type_of(tcx: TyCtxt<'_>, def_id: DefId, fail: bool) -> Option<Ty<
1331
1331
}
1332
1332
}
1333
1333
1334
- Node :: ForeignItem ( foreign_item) => match foreign_item. node {
1334
+ Node :: ForeignItem ( foreign_item) => match foreign_item. kind {
1335
1335
ForeignItemKind :: Fn ( ..) => {
1336
1336
let substs = InternalSubsts :: identity_for_item ( tcx, def_id) ;
1337
1337
tcx. mk_fn_def ( def_id, substs)
@@ -1823,7 +1823,7 @@ fn fn_sig(tcx: TyCtxt<'_>, def_id: DefId) -> ty::PolyFnSig<'_> {
1823
1823
} ,
1824
1824
1825
1825
ForeignItem ( & hir:: ForeignItem {
1826
- node : ForeignItemKind :: Fn ( ref fn_decl, _, _) ,
1826
+ kind : ForeignItemKind :: Fn ( ref fn_decl, _, _) ,
1827
1827
..
1828
1828
} ) => {
1829
1829
let abi = tcx. hir ( ) . get_foreign_abi ( hir_id) ;
@@ -2133,7 +2133,7 @@ fn explicit_predicates_of(
2133
2133
}
2134
2134
}
2135
2135
2136
- Node :: ForeignItem ( item) => match item. node {
2136
+ Node :: ForeignItem ( item) => match item. kind {
2137
2137
ForeignItemKind :: Static ( ..) => NO_GENERICS ,
2138
2138
ForeignItemKind :: Fn ( _, _, ref generics) => generics,
2139
2139
ForeignItemKind :: Type => NO_GENERICS ,
@@ -2420,7 +2420,7 @@ fn static_mutability(tcx: TyCtxt<'_>, def_id: DefId) -> Option<hir::Mutability>
2420
2420
kind : hir:: ItemKind :: Static ( _, mutbl, _) , ..
2421
2421
} ) ) |
2422
2422
Some ( Node :: ForeignItem ( & hir:: ForeignItem {
2423
- node : hir:: ForeignItemKind :: Static ( _, mutbl) , ..
2423
+ kind : hir:: ForeignItemKind :: Static ( _, mutbl) , ..
2424
2424
} ) ) => Some ( mutbl) ,
2425
2425
Some ( _) => None ,
2426
2426
_ => bug ! ( "static_mutability applied to non-local def-id {:?}" , def_id) ,
0 commit comments