diff options
| author | Marmare314 <49279081+Marmare314@users.noreply.github.com> | 2023-04-25 11:22:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-25 11:22:12 +0200 |
| commit | d5d98b67a83944d72a5c0f8e8e2f43aeee667122 (patch) | |
| tree | 11580441926d1c24c6243868232b44b844663c4b /src/eval/func.rs | |
| parent | efad1e71fa699e0d2413d3a6a3ce5a4163e38112 (diff) | |
Destructuring assign (#703)
Diffstat (limited to 'src/eval/func.rs')
| -rw-r--r-- | src/eval/func.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eval/func.rs b/src/eval/func.rs index 489527ef..e3b6a99c 100644 --- a/src/eval/func.rs +++ b/src/eval/func.rs @@ -445,7 +445,9 @@ impl<'a> CapturesVisitor<'a> { match param { ast::Param::Pos(ident) => self.bind(ident), ast::Param::Named(named) => self.bind(named.name()), - ast::Param::Sink(Some(ident)) => self.bind(ident), + ast::Param::Sink(spread) => { + self.bind(spread.name().unwrap_or_default()) + } _ => {} } } |
