diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2011-04-27 14:40:07 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2011-04-28 13:26:19 -0700 |
| commit | 93845d0bae9258e6617c79474cd4265fcafc133c (patch) | |
| tree | 1e8fa4f15c4d69bb44d693b657aaac2305f88c65 /src/rt/rust_crate_cache.cpp | |
| parent | 25694582d994add42972b068209aa0b29fe8dcf1 (diff) | |
| download | rust-93845d0bae9258e6617c79474cd4265fcafc133c.tar.gz rust-93845d0bae9258e6617c79474cd4265fcafc133c.zip | |
Fix nested patterns in rustboot
The code for taking pattern-bound variables was being interspersed with pattern code, so that if a nested pattern failed partway through, a variable would be taken but never dropped (because the drop code is inside the block representing the action for the pattern). For example, in the pattern foo(?i, bar(some[t](_)), _), if the scrutinee was foo(x, bar(none[t]), y), the variable i would be taken but never dropped. The patch fixes this bug.
Diffstat (limited to 'src/rt/rust_crate_cache.cpp')
0 files changed, 0 insertions, 0 deletions
