@@ -20,14 +20,14 @@ pub struct InferenceTable<I: Interner> {
20
20
max_universe : UniverseIndex ,
21
21
}
22
22
23
- pub ( crate ) struct InferenceSnapshot < I : Interner > {
23
+ pub struct InferenceSnapshot < I : Interner > {
24
24
unify_snapshot : ena:: unify:: Snapshot < ena:: unify:: InPlace < EnaVariable < I > > > ,
25
25
max_universe : UniverseIndex ,
26
26
vars : Vec < EnaVariable < I > > ,
27
27
}
28
28
29
29
#[ allow( type_alias_bounds) ]
30
- pub ( crate ) type ParameterEnaVariable < I : Interner > = WithKind < I , EnaVariable < I > > ;
30
+ pub type ParameterEnaVariable < I : Interner > = WithKind < I , EnaVariable < I > > ;
31
31
32
32
impl < I : Interner > InferenceTable < I > {
33
33
/// Create an empty inference table with no variables.
@@ -72,7 +72,7 @@ impl<I: Interner> InferenceTable<I> {
72
72
/// others created within this inference table. This universe is
73
73
/// able to see all previously created universes (though hopefully
74
74
/// it is only brought into contact with its logical *parents*).
75
- pub ( crate ) fn new_universe ( & mut self ) -> UniverseIndex {
75
+ pub fn new_universe ( & mut self ) -> UniverseIndex {
76
76
let u = self . max_universe . next ( ) ;
77
77
self . max_universe = u;
78
78
debug ! ( "created new universe: {:?}" , u) ;
@@ -95,7 +95,7 @@ impl<I: Interner> InferenceTable<I> {
95
95
/// must respect a stack discipline (i.e., rollback or commit
96
96
/// snapshots in reverse order of that with which they were
97
97
/// created).
98
- pub ( crate ) fn snapshot ( & mut self ) -> InferenceSnapshot < I > {
98
+ pub fn snapshot ( & mut self ) -> InferenceSnapshot < I > {
99
99
let unify_snapshot = self . unify . snapshot ( ) ;
100
100
let vars = self . vars . clone ( ) ;
101
101
let max_universe = self . max_universe ;
@@ -107,14 +107,14 @@ impl<I: Interner> InferenceTable<I> {
107
107
}
108
108
109
109
/// Restore the table to the state it had when the snapshot was taken.
110
- pub ( crate ) fn rollback_to ( & mut self , snapshot : InferenceSnapshot < I > ) {
110
+ pub fn rollback_to ( & mut self , snapshot : InferenceSnapshot < I > ) {
111
111
self . unify . rollback_to ( snapshot. unify_snapshot ) ;
112
112
self . vars = snapshot. vars ;
113
113
self . max_universe = snapshot. max_universe ;
114
114
}
115
115
116
116
/// Make permanent the changes made since the snapshot was taken.
117
- pub ( crate ) fn commit ( & mut self , snapshot : InferenceSnapshot < I > ) {
117
+ pub fn commit ( & mut self , snapshot : InferenceSnapshot < I > ) {
118
118
self . unify . commit ( snapshot. unify_snapshot ) ;
119
119
}
120
120
0 commit comments