@@ -24,7 +24,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
24
24
/// Identifies what test is needed to decide if `match_pair` is applicable.
25
25
///
26
26
/// It is a bug to call this with a simplifiable pattern.
27
- crate fn test < ' pat > ( & mut self , match_pair : & MatchPair < ' pat , ' tcx > ) -> Test < ' tcx > {
27
+ pub ( super ) fn test < ' pat > ( & mut self , match_pair : & MatchPair < ' pat , ' tcx > ) -> Test < ' tcx > {
28
28
match * match_pair. pattern . kind {
29
29
PatKind :: Variant { ref adt_def, substs : _, variant_index : _, subpatterns : _ } => Test {
30
30
span : match_pair. pattern . span ,
@@ -81,7 +81,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
81
81
}
82
82
}
83
83
84
- crate fn add_cases_to_switch < ' pat > (
84
+ pub ( super ) fn add_cases_to_switch < ' pat > (
85
85
& mut self ,
86
86
test_place : & Place < ' tcx > ,
87
87
candidate : & Candidate < ' pat , ' tcx > ,
@@ -125,7 +125,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
125
125
}
126
126
}
127
127
128
- crate fn add_variants_to_switch < ' pat > (
128
+ pub ( super ) fn add_variants_to_switch < ' pat > (
129
129
& mut self ,
130
130
test_place : & Place < ' tcx > ,
131
131
candidate : & Candidate < ' pat , ' tcx > ,
@@ -152,7 +152,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
152
152
}
153
153
}
154
154
155
- crate fn perform_test (
155
+ pub ( super ) fn perform_test (
156
156
& mut self ,
157
157
block : BasicBlock ,
158
158
place : & Place < ' tcx > ,
@@ -498,7 +498,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
498
498
/// that it *doesn't* apply. For now, we return false, indicate that the
499
499
/// test does not apply to this candidate, but it might be we can get
500
500
/// tighter match code if we do something a bit different.
501
- crate fn sort_candidate < ' pat > (
501
+ pub ( super ) fn sort_candidate < ' pat > (
502
502
& mut self ,
503
503
test_place : & Place < ' tcx > ,
504
504
test : & Test < ' tcx > ,
0 commit comments