@@ -57,7 +57,7 @@ mod type_of;
57
57
58
58
///////////////////////////////////////////////////////////////////////////
59
59
60
- pub fn provide ( providers : & mut Providers ) {
60
+ pub ( crate ) fn provide ( providers : & mut Providers ) {
61
61
resolve_bound_vars:: provide ( providers) ;
62
62
* providers = Providers {
63
63
type_of : type_of:: type_of,
@@ -122,7 +122,7 @@ pub fn provide(providers: &mut Providers) {
122
122
/// `ItemCtxt` is parameterized by a `DefId` that it uses to satisfy
123
123
/// `probe_ty_param_bounds` requests, drawing the information from
124
124
/// the HIR (`hir::Generics`), recursively.
125
- pub struct ItemCtxt < ' tcx > {
125
+ pub ( crate ) struct ItemCtxt < ' tcx > {
126
126
tcx : TyCtxt < ' tcx > ,
127
127
item_def_id : LocalDefId ,
128
128
tainted_by_errors : Cell < Option < ErrorGuaranteed > > ,
@@ -148,7 +148,7 @@ impl<'v> Visitor<'v> for HirPlaceholderCollector {
148
148
}
149
149
}
150
150
151
- pub struct CollectItemTypesVisitor < ' tcx > {
151
+ pub ( crate ) struct CollectItemTypesVisitor < ' tcx > {
152
152
pub tcx : TyCtxt < ' tcx > ,
153
153
}
154
154
@@ -364,19 +364,19 @@ fn bad_placeholder<'cx, 'tcx>(
364
364
}
365
365
366
366
impl < ' tcx > ItemCtxt < ' tcx > {
367
- pub fn new ( tcx : TyCtxt < ' tcx > , item_def_id : LocalDefId ) -> ItemCtxt < ' tcx > {
367
+ pub ( crate ) fn new ( tcx : TyCtxt < ' tcx > , item_def_id : LocalDefId ) -> ItemCtxt < ' tcx > {
368
368
ItemCtxt { tcx, item_def_id, tainted_by_errors : Cell :: new ( None ) }
369
369
}
370
370
371
- pub fn lower_ty ( & self , hir_ty : & hir:: Ty < ' tcx > ) -> Ty < ' tcx > {
371
+ pub ( crate ) fn lower_ty ( & self , hir_ty : & hir:: Ty < ' tcx > ) -> Ty < ' tcx > {
372
372
self . lowerer ( ) . lower_ty ( hir_ty)
373
373
}
374
374
375
- pub fn hir_id ( & self ) -> hir:: HirId {
375
+ pub ( crate ) fn hir_id ( & self ) -> hir:: HirId {
376
376
self . tcx . local_def_id_to_hir_id ( self . item_def_id )
377
377
}
378
378
379
- pub fn node ( & self ) -> hir:: Node < ' tcx > {
379
+ pub ( crate ) fn node ( & self ) -> hir:: Node < ' tcx > {
380
380
self . tcx . hir_node ( self . hir_id ( ) )
381
381
}
382
382
0 commit comments