Remove symbols_from_pattern

This commit is contained in:
Ayaz Hafiz 2022-05-10 16:01:12 -04:00
parent 9777886376
commit 17d8545510
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 3 additions and 56 deletions

View file

@ -594,7 +594,9 @@ fn fix_values_captured_in_closure_defs(
) {
// recursive defs cannot capture each other
for def in defs.iter() {
no_capture_symbols.extend(crate::pattern::symbols_from_pattern(&def.loc_pattern.value));
no_capture_symbols.extend(
crate::traverse::symbols_introduced_from_pattern(&def.loc_pattern).map(|ls| ls.value),
);
}
// TODO mutually recursive functions should both capture the union of both their capture sets