56
56
/// string (as well as that of rendering up-front); in exchange, you
57
57
/// don't have to hand over ownership of your value or deal with
58
58
/// borrowing it.
59
- pub ( crate ) struct DebugFormatted ( String ) ;
59
+ pub struct DebugFormatted ( String ) ;
60
60
61
61
impl DebugFormatted {
62
62
pub fn new ( input : & dyn fmt:: Debug ) -> DebugFormatted {
@@ -70,7 +70,7 @@ impl fmt::Debug for DebugFormatted {
70
70
}
71
71
}
72
72
73
- pub ( crate ) trait Dataflow < ' tcx , BD : BitDenotation < ' tcx > > {
73
+ pub trait Dataflow < ' tcx , BD : BitDenotation < ' tcx > > {
74
74
/// Sets up and runs the dataflow problem, using `p` to render results if
75
75
/// implementation so chooses.
76
76
fn dataflow < P > ( & mut self , p : P ) where P : Fn ( & BD , BD :: Idx ) -> DebugFormatted {
@@ -121,7 +121,7 @@ pub struct MoveDataParamEnv<'tcx> {
121
121
pub ( crate ) param_env : ty:: ParamEnv < ' tcx > ,
122
122
}
123
123
124
- pub ( crate ) fn do_dataflow < ' a , ' tcx , BD , P > (
124
+ pub fn do_dataflow < ' a , ' tcx , BD , P > (
125
125
tcx : TyCtxt < ' tcx > ,
126
126
body : & ' a Body < ' tcx > ,
127
127
def_id : DefId ,
@@ -565,7 +565,7 @@ pub struct GenKill<T> {
565
565
pub ( crate ) kill_set : T ,
566
566
}
567
567
568
- type GenKillSet < T > = GenKill < HybridBitSet < T > > ;
568
+ pub type GenKillSet < T > = GenKill < HybridBitSet < T > > ;
569
569
570
570
impl < T > GenKill < T > {
571
571
/// Creates a new tuple where `gen_set == kill_set == elem`.
@@ -580,28 +580,28 @@ impl<T> GenKill<T> {
580
580
}
581
581
582
582
impl < E : Idx > GenKillSet < E > {
583
- pub ( crate ) fn clear ( & mut self ) {
583
+ pub fn clear ( & mut self ) {
584
584
self . gen_set . clear ( ) ;
585
585
self . kill_set . clear ( ) ;
586
586
}
587
587
588
- fn gen ( & mut self , e : E ) {
588
+ pub fn gen ( & mut self , e : E ) {
589
589
self . gen_set . insert ( e) ;
590
590
self . kill_set . remove ( e) ;
591
591
}
592
592
593
- fn gen_all ( & mut self , i : impl IntoIterator < Item : Borrow < E > > ) {
593
+ pub fn gen_all ( & mut self , i : impl IntoIterator < Item : Borrow < E > > ) {
594
594
for j in i {
595
595
self . gen ( * j. borrow ( ) ) ;
596
596
}
597
597
}
598
598
599
- fn kill ( & mut self , e : E ) {
599
+ pub fn kill ( & mut self , e : E ) {
600
600
self . gen_set . remove ( e) ;
601
601
self . kill_set . insert ( e) ;
602
602
}
603
603
604
- fn kill_all ( & mut self , i : impl IntoIterator < Item : Borrow < E > > ) {
604
+ pub fn kill_all ( & mut self , i : impl IntoIterator < Item : Borrow < E > > ) {
605
605
for j in i {
606
606
self . kill ( * j. borrow ( ) ) ;
607
607
}
0 commit comments