@@ -8,28 +8,28 @@ use fold::shift::Shift;
8
8
use fold:: Fold ;
9
9
use interner:: { HasInterner , Interner } ;
10
10
11
- pub ( crate ) struct GoalBuilder < ' i , I : Interner > {
11
+ pub struct GoalBuilder < ' i , I : Interner > {
12
12
db : & ' i dyn RustIrDatabase < I > ,
13
13
}
14
14
15
15
impl < ' i , I : Interner > GoalBuilder < ' i , I > {
16
- pub ( crate ) fn new ( db : & ' i dyn RustIrDatabase < I > ) -> Self {
16
+ pub fn new ( db : & ' i dyn RustIrDatabase < I > ) -> Self {
17
17
GoalBuilder { db }
18
18
}
19
19
20
20
/// Returns the database within the goal builder.
21
- pub ( crate ) fn db ( & self ) -> & ' i dyn RustIrDatabase < I > {
21
+ pub fn db ( & self ) -> & ' i dyn RustIrDatabase < I > {
22
22
self . db
23
23
}
24
24
25
25
/// Returns the interner within the goal builder.
26
- pub ( crate ) fn interner ( & self ) -> & ' i I {
26
+ pub fn interner ( & self ) -> & ' i I {
27
27
self . db . interner ( )
28
28
}
29
29
30
30
/// Creates a goal that ensures all of the goals from the `goals`
31
31
/// iterator are met (e.g., `goals[0] && ... && goals[N]`).
32
- pub ( crate ) fn all < GS , G > ( & mut self , goals : GS ) -> Goal < I >
32
+ pub fn all < GS , G > ( & mut self , goals : GS ) -> Goal < I >
33
33
where
34
34
GS : IntoIterator < Item = G > ,
35
35
G : CastTo < Goal < I > > ,
@@ -39,11 +39,7 @@ impl<'i, I: Interner> GoalBuilder<'i, I> {
39
39
40
40
/// Creates a goal `clauses => goal`. The clauses are given as an iterator
41
41
/// and the goal is returned via the contained closure.
42
- pub ( crate ) fn implies < CS , C , G > (
43
- & mut self ,
44
- clauses : CS ,
45
- goal : impl FnOnce ( & mut Self ) -> G ,
46
- ) -> Goal < I >
42
+ pub fn implies < CS , C , G > ( & mut self , clauses : CS , goal : impl FnOnce ( & mut Self ) -> G ) -> Goal < I >
47
43
where
48
44
CS : IntoIterator < Item = C > ,
49
45
C : CastTo < ProgramClause < I > > ,
@@ -77,7 +73,7 @@ impl<'i, I: Interner> GoalBuilder<'i, I> {
77
73
/// This is to ensure that `body` doesn't accidentally reference
78
74
/// values from the environment whose debruijn indices do not
79
75
/// account for the new binder being created.
80
- pub ( crate ) fn forall < G , B , P > (
76
+ pub fn forall < G , B , P > (
81
77
& mut self ,
82
78
binders : & Binders < B > ,
83
79
passthru : P ,
@@ -93,7 +89,7 @@ impl<'i, I: Interner> GoalBuilder<'i, I> {
93
89
}
94
90
95
91
/// Like [`GoalBuilder::forall`], but for a `exists<Q0..Qn> { G }` goal.
96
- pub ( crate ) fn exists < G , B , P > (
92
+ pub fn exists < G , B , P > (
97
93
& mut self ,
98
94
binders : & Binders < B > ,
99
95
passthru : P ,
0 commit comments