@@ -793,11 +793,11 @@ impl<'a, 'tcx> LateContext<'a, 'tcx> {
793793 run_lints ! ( self , exit_lint_attrs, attrs) ;
794794 }
795795
796- fn with_param_env < F > ( & mut self , id : ast :: NodeId , f : F )
796+ fn with_param_env < F > ( & mut self , id : hir :: HirId , f : F )
797797 where F : FnOnce ( & mut Self ) ,
798798 {
799799 let old_param_env = self . param_env ;
800- self . param_env = self . tcx . param_env ( self . tcx . hir ( ) . local_def_id ( id) ) ;
800+ self . param_env = self . tcx . param_env ( self . tcx . hir ( ) . local_def_id_from_hir_id ( id) ) ;
801801 f ( self ) ;
802802 self . param_env = old_param_env;
803803 }
@@ -841,7 +841,7 @@ impl<'a, 'tcx> hir_visit::Visitor<'tcx> for LateContext<'a, 'tcx> {
841841 let generics = self . generics . take ( ) ;
842842 self . generics = it. node . generics ( ) ;
843843 self . with_lint_attrs ( it. hir_id , & it. attrs , |cx| {
844- cx. with_param_env ( it. id , |cx| {
844+ cx. with_param_env ( it. hir_id , |cx| {
845845 run_lints ! ( cx, check_item, it) ;
846846 hir_visit:: walk_item ( cx, it) ;
847847 run_lints ! ( cx, check_item_post, it) ;
@@ -852,7 +852,7 @@ impl<'a, 'tcx> hir_visit::Visitor<'tcx> for LateContext<'a, 'tcx> {
852852
853853 fn visit_foreign_item ( & mut self , it : & ' tcx hir:: ForeignItem ) {
854854 self . with_lint_attrs ( it. hir_id , & it. attrs , |cx| {
855- cx. with_param_env ( it. id , |cx| {
855+ cx. with_param_env ( it. hir_id , |cx| {
856856 run_lints ! ( cx, check_foreign_item, it) ;
857857 hir_visit:: walk_foreign_item ( cx, it) ;
858858 run_lints ! ( cx, check_foreign_item_post, it) ;
@@ -983,7 +983,7 @@ impl<'a, 'tcx> hir_visit::Visitor<'tcx> for LateContext<'a, 'tcx> {
983983 let generics = self . generics . take ( ) ;
984984 self . generics = Some ( & trait_item. generics ) ;
985985 self . with_lint_attrs ( trait_item. hir_id , & trait_item. attrs , |cx| {
986- cx. with_param_env ( trait_item. id , |cx| {
986+ cx. with_param_env ( trait_item. hir_id , |cx| {
987987 run_lints ! ( cx, check_trait_item, trait_item) ;
988988 hir_visit:: walk_trait_item ( cx, trait_item) ;
989989 run_lints ! ( cx, check_trait_item_post, trait_item) ;
@@ -996,7 +996,7 @@ impl<'a, 'tcx> hir_visit::Visitor<'tcx> for LateContext<'a, 'tcx> {
996996 let generics = self . generics . take ( ) ;
997997 self . generics = Some ( & impl_item. generics ) ;
998998 self . with_lint_attrs ( impl_item. hir_id , & impl_item. attrs , |cx| {
999- cx. with_param_env ( impl_item. id , |cx| {
999+ cx. with_param_env ( impl_item. hir_id , |cx| {
10001000 run_lints ! ( cx, check_impl_item, impl_item) ;
10011001 hir_visit:: walk_impl_item ( cx, impl_item) ;
10021002 run_lints ! ( cx, check_impl_item_post, impl_item) ;
0 commit comments