Skip to content

Commit 328c776

Browse files
committed
Update comments
1 parent 0ca1d22 commit 328c776

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

compiler/rustc_mir_build/src/build/matches/simplify.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
9595
debug!(simplified = ?match_pairs, "simplify_match_pairs");
9696
}
9797

98-
/// Given `candidate` that has a single or-pattern for its match-pairs,
99-
/// creates a fresh candidate for each of its input subpatterns passed via
100-
/// `pats`.
98+
/// Create a new candidate for each pattern in `pats`, and recursively simplify tje
99+
/// single-or-pattern case.
101100
pub(super) fn create_or_subcandidates<'pat>(
102101
&mut self,
103102
place: &PlaceBuilder<'tcx>,
@@ -119,11 +118,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
119118
.collect()
120119
}
121120

122-
/// Tries to simplify `match_pair`, returning `Ok(())` if
123-
/// successful. If successful, new match pairs and bindings will
124-
/// have been pushed into the candidate. If no simplification is
125-
/// possible, `Err` is returned and no changes are made to
126-
/// candidate.
121+
/// Tries to simplify `match_pair`, returning `Ok(())` if successful. If successful, new match
122+
/// pairs and bindings will have been pushed into the respective `Vec`s. If no simplification is
123+
/// possible, `Err` is returned.
127124
fn simplify_match_pair<'pat>(
128125
&mut self,
129126
mut match_pair: MatchPair<'pat, 'tcx>,

0 commit comments

Comments
 (0)