@@ -793,11 +793,11 @@ impl<'a, 'tcx> LateContext<'a, 'tcx> {
793
793
run_lints ! ( self , exit_lint_attrs, attrs) ;
794
794
}
795
795
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 )
797
797
where F : FnOnce ( & mut Self ) ,
798
798
{
799
799
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) ) ;
801
801
f ( self ) ;
802
802
self . param_env = old_param_env;
803
803
}
@@ -841,7 +841,7 @@ impl<'a, 'tcx> hir_visit::Visitor<'tcx> for LateContext<'a, 'tcx> {
841
841
let generics = self . generics . take ( ) ;
842
842
self . generics = it. node . generics ( ) ;
843
843
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| {
845
845
run_lints ! ( cx, check_item, it) ;
846
846
hir_visit:: walk_item ( cx, it) ;
847
847
run_lints ! ( cx, check_item_post, it) ;
@@ -852,7 +852,7 @@ impl<'a, 'tcx> hir_visit::Visitor<'tcx> for LateContext<'a, 'tcx> {
852
852
853
853
fn visit_foreign_item ( & mut self , it : & ' tcx hir:: ForeignItem ) {
854
854
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| {
856
856
run_lints ! ( cx, check_foreign_item, it) ;
857
857
hir_visit:: walk_foreign_item ( cx, it) ;
858
858
run_lints ! ( cx, check_foreign_item_post, it) ;
@@ -983,7 +983,7 @@ impl<'a, 'tcx> hir_visit::Visitor<'tcx> for LateContext<'a, 'tcx> {
983
983
let generics = self . generics . take ( ) ;
984
984
self . generics = Some ( & trait_item. generics ) ;
985
985
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| {
987
987
run_lints ! ( cx, check_trait_item, trait_item) ;
988
988
hir_visit:: walk_trait_item ( cx, trait_item) ;
989
989
run_lints ! ( cx, check_trait_item_post, trait_item) ;
@@ -996,7 +996,7 @@ impl<'a, 'tcx> hir_visit::Visitor<'tcx> for LateContext<'a, 'tcx> {
996
996
let generics = self . generics . take ( ) ;
997
997
self . generics = Some ( & impl_item. generics ) ;
998
998
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| {
1000
1000
run_lints ! ( cx, check_impl_item, impl_item) ;
1001
1001
hir_visit:: walk_impl_item ( cx, impl_item) ;
1002
1002
run_lints ! ( cx, check_impl_item_post, impl_item) ;
0 commit comments