@@ -15,7 +15,7 @@ use crate::infer::{GenericKind, VerifyBound};
15
15
/// via a "delegate" of type `D` -- this is usually the `infcx`, which
16
16
/// accrues them into the `region_obligations` code, but for NLL we
17
17
/// use something else.
18
- pub struct VerifyBoundCx < ' cx , ' tcx > {
18
+ pub ( crate ) struct VerifyBoundCx < ' cx , ' tcx > {
19
19
tcx : TyCtxt < ' tcx > ,
20
20
region_bound_pairs : & ' cx RegionBoundPairs < ' tcx > ,
21
21
/// During borrowck, if there are no outlives bounds on a generic
@@ -28,7 +28,7 @@ pub struct VerifyBoundCx<'cx, 'tcx> {
28
28
}
29
29
30
30
impl < ' cx , ' tcx > VerifyBoundCx < ' cx , ' tcx > {
31
- pub fn new (
31
+ pub ( crate ) fn new (
32
32
tcx : TyCtxt < ' tcx > ,
33
33
region_bound_pairs : & ' cx RegionBoundPairs < ' tcx > ,
34
34
implicit_region_bound : Option < ty:: Region < ' tcx > > ,
@@ -38,7 +38,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
38
38
}
39
39
40
40
#[ instrument( level = "debug" , skip( self ) ) ]
41
- pub fn param_or_placeholder_bound ( & self , ty : Ty < ' tcx > ) -> VerifyBound < ' tcx > {
41
+ pub ( crate ) fn param_or_placeholder_bound ( & self , ty : Ty < ' tcx > ) -> VerifyBound < ' tcx > {
42
42
// Start with anything like `T: 'a` we can scrape from the
43
43
// environment. If the environment contains something like
44
44
// `for<'a> T: 'a`, then we know that `T` outlives everything.
@@ -92,7 +92,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
92
92
/// the clause from the environment only applies if `'0 = 'a`,
93
93
/// which we don't know yet. But we would still include `'b` in
94
94
/// this list.
95
- pub fn approx_declared_bounds_from_env (
95
+ pub ( crate ) fn approx_declared_bounds_from_env (
96
96
& self ,
97
97
alias_ty : ty:: AliasTy < ' tcx > ,
98
98
) -> Vec < ty:: PolyTypeOutlivesPredicate < ' tcx > > {
@@ -101,7 +101,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
101
101
}
102
102
103
103
#[ instrument( level = "debug" , skip( self ) ) ]
104
- pub fn alias_bound ( & self , alias_ty : ty:: AliasTy < ' tcx > ) -> VerifyBound < ' tcx > {
104
+ pub ( crate ) fn alias_bound ( & self , alias_ty : ty:: AliasTy < ' tcx > ) -> VerifyBound < ' tcx > {
105
105
let alias_ty_as_ty = alias_ty. to_ty ( self . tcx ) ;
106
106
107
107
// Search the env for where clauses like `P: 'a`.
@@ -285,7 +285,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
285
285
///
286
286
/// This is for simplicity, and because we are not really smart
287
287
/// enough to cope with such bounds anywhere.
288
- pub fn declared_bounds_from_definition (
288
+ pub ( crate ) fn declared_bounds_from_definition (
289
289
& self ,
290
290
alias_ty : ty:: AliasTy < ' tcx > ,
291
291
) -> impl Iterator < Item = ty:: Region < ' tcx > > {
0 commit comments