@@ -762,8 +762,8 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
762762 }
763763 }
764764
765- fn check_foreign_fn ( & mut self , id : ast :: NodeId , decl : & hir:: FnDecl ) {
766- let def_id = self . cx . tcx . hir ( ) . local_def_id ( id) ;
765+ fn check_foreign_fn ( & mut self , id : hir :: HirId , decl : & hir:: FnDecl ) {
766+ let def_id = self . cx . tcx . hir ( ) . local_def_id_from_hir_id ( id) ;
767767 let sig = self . cx . tcx . fn_sig ( def_id) ;
768768 let sig = self . cx . tcx . erase_late_bound_regions ( & sig) ;
769769 let inputs = if sig. c_variadic {
@@ -786,8 +786,8 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
786786 }
787787 }
788788
789- fn check_foreign_static ( & mut self , id : ast :: NodeId , span : Span ) {
790- let def_id = self . cx . tcx . hir ( ) . local_def_id ( id) ;
789+ fn check_foreign_static ( & mut self , id : hir :: HirId , span : Span ) {
790+ let def_id = self . cx . tcx . hir ( ) . local_def_id_from_hir_id ( id) ;
791791 let ty = self . cx . tcx . type_of ( def_id) ;
792792 self . check_type_for_ffi_and_report_errors ( span, ty) ;
793793 }
@@ -809,14 +809,14 @@ impl LintPass for ImproperCTypes {
809809impl < ' a , ' tcx > LateLintPass < ' a , ' tcx > for ImproperCTypes {
810810 fn check_foreign_item ( & mut self , cx : & LateContext < ' _ , ' _ > , it : & hir:: ForeignItem ) {
811811 let mut vis = ImproperCTypesVisitor { cx } ;
812- let abi = cx. tcx . hir ( ) . get_foreign_abi ( it. id ) ;
812+ let abi = cx. tcx . hir ( ) . get_foreign_abi_by_hir_id ( it. hir_id ) ;
813813 if abi != Abi :: RustIntrinsic && abi != Abi :: PlatformIntrinsic {
814814 match it. node {
815815 hir:: ForeignItemKind :: Fn ( ref decl, _, _) => {
816- vis. check_foreign_fn ( it. id , decl) ;
816+ vis. check_foreign_fn ( it. hir_id , decl) ;
817817 }
818818 hir:: ForeignItemKind :: Static ( ref ty, _) => {
819- vis. check_foreign_static ( it. id , ty. span ) ;
819+ vis. check_foreign_static ( it. hir_id , ty. span ) ;
820820 }
821821 hir:: ForeignItemKind :: Type => ( )
822822 }
0 commit comments