Tweak a confusing comment in create_match_candidates
This commit is contained in:
parent
6b0f4b5ec3
commit
8016940ef4
1 changed files with 5 additions and 2 deletions
|
@ -358,8 +358,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
where
|
where
|
||||||
'a: 'pat,
|
'a: 'pat,
|
||||||
{
|
{
|
||||||
// Assemble a list of candidates: there is one candidate per pattern,
|
// Assemble the initial list of candidates. These top-level candidates
|
||||||
// which means there may be more than one candidate *per arm*.
|
// are 1:1 with the original match arms, but other parts of match
|
||||||
|
// lowering also introduce subcandidates (for subpatterns), and will
|
||||||
|
// also flatten candidates in some cases. So in general a list of
|
||||||
|
// candidates does _not_ necessarily correspond to a list of arms.
|
||||||
arms.iter()
|
arms.iter()
|
||||||
.copied()
|
.copied()
|
||||||
.map(|arm| {
|
.map(|arm| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue