Handle multi pattern unbound list rest variables

This commit is contained in:
JRI98 2024-06-21 17:01:49 +01:00
parent 03eadc2e0f
commit f4551978ce
No known key found for this signature in database
GPG key ID: F83B29916FF13F24
4 changed files with 35 additions and 5 deletions

View file

@ -1084,7 +1084,9 @@ fn from_can_pattern_help<'a>(
list_layout,
element_layout,
elements: mono_patterns,
opt_rest: patterns.opt_rest,
opt_rest: patterns
.opt_rest
.map(|(i, name)| (i, name.map(|s| s.value))),
})
}
}