@@ -21,7 +21,7 @@ use rustc::ty::{self, TyCtxt, Ty, TraitRef, TypeFoldable, GenericParamDefKind};
21
21
use rustc:: ty:: fold:: TypeVisitor ;
22
22
use rustc:: ty:: query:: Providers ;
23
23
use rustc:: ty:: subst:: Substs ;
24
- use rustc:: util:: nodemap:: NodeSet ;
24
+ use rustc:: util:: nodemap:: HirIdSet ;
25
25
use rustc_data_structures:: fx:: FxHashSet ;
26
26
use rustc_data_structures:: sync:: Lrc ;
27
27
use syntax:: ast:: { self , DUMMY_NODE_ID , Ident } ;
@@ -1152,7 +1152,7 @@ struct ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx: 'a> {
1152
1152
access_levels : & ' a AccessLevels ,
1153
1153
in_variant : bool ,
1154
1154
// Set of errors produced by this obsolete visitor.
1155
- old_error_set : NodeSet ,
1155
+ old_error_set : HirIdSet ,
1156
1156
}
1157
1157
1158
1158
struct ObsoleteCheckTypeForPrivatenessVisitor < ' a , ' b : ' a , ' tcx : ' b > {
@@ -1196,7 +1196,7 @@ impl<'a, 'tcx> ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
1196
1196
fn check_generic_bound ( & mut self , bound : & hir:: GenericBound ) {
1197
1197
if let hir:: GenericBound :: Trait ( ref trait_ref, _) = * bound {
1198
1198
if self . path_is_private_type ( & trait_ref. trait_ref . path ) {
1199
- self . old_error_set . insert ( trait_ref. trait_ref . ref_id ) ;
1199
+ self . old_error_set . insert ( trait_ref. trait_ref . hir_ref_id ) ;
1200
1200
}
1201
1201
}
1202
1202
}
@@ -1452,7 +1452,7 @@ impl<'a, 'tcx> Visitor<'tcx> for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
1452
1452
fn visit_ty ( & mut self , t : & ' tcx hir:: Ty ) {
1453
1453
if let hir:: TyKind :: Path ( hir:: QPath :: Resolved ( _, ref path) ) = t. node {
1454
1454
if self . path_is_private_type ( path) {
1455
- self . old_error_set . insert ( t. id ) ;
1455
+ self . old_error_set . insert ( t. hir_id ) ;
1456
1456
}
1457
1457
}
1458
1458
intravisit:: walk_ty ( self , t)
@@ -1596,7 +1596,7 @@ impl<'a, 'tcx> DefIdVisitor<'a, 'tcx> for SearchInterfaceForPrivateItemsVisitor<
1596
1596
struct PrivateItemsInPublicInterfacesVisitor < ' a , ' tcx : ' a > {
1597
1597
tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
1598
1598
has_pub_restricted : bool ,
1599
- old_error_set : & ' a NodeSet ,
1599
+ old_error_set : & ' a HirIdSet ,
1600
1600
private_crates : FxHashSet < CrateNum >
1601
1601
}
1602
1602
@@ -1608,7 +1608,7 @@ impl<'a, 'tcx> PrivateItemsInPublicInterfacesVisitor<'a, 'tcx> {
1608
1608
// Slow path taken only if there any errors in the crate.
1609
1609
for & id in self . old_error_set {
1610
1610
// Walk up the nodes until we find `item_id` (or we hit a root).
1611
- let mut id = id ;
1611
+ let mut id = self . tcx . hir ( ) . hir_to_node_id ( id ) ;
1612
1612
loop {
1613
1613
if id == item_id {
1614
1614
has_old_errors = true ;
0 commit comments