diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-09-01 14:35:00 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-09-01 16:32:44 +0200 |
| commit | 6ba4eacddf2a07e13f6589f04303ce7fb4c4d70c (patch) | |
| tree | eaf81d69cf68aa58a97c148df9b9678ad5ff0957 /src/test/compile-fail/lambda-mutate-nested.rs | |
| parent | 2d1dec78e7fd2fa0a569f797d147d5940e81f3d0 (diff) | |
| download | rust-6ba4eacddf2a07e13f6589f04303ce7fb4c4d70c.tar.gz rust-6ba4eacddf2a07e13f6589f04303ce7fb4c4d70c.zip | |
Make resolve recognize upvars
Upvars are now marked with def_upvar throughout, not just when going through freevars::lookup_def. This makes things less error-prone. One thing to watch out for is that def_upvar is used in `for each` bodies too, when they refer to a local outside the body.
Diffstat (limited to 'src/test/compile-fail/lambda-mutate-nested.rs')
| -rw-r--r-- | src/test/compile-fail/lambda-mutate-nested.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/compile-fail/lambda-mutate-nested.rs b/src/test/compile-fail/lambda-mutate-nested.rs index 409b0e59950..05a3cc95e20 100644 --- a/src/test/compile-fail/lambda-mutate-nested.rs +++ b/src/test/compile-fail/lambda-mutate-nested.rs @@ -1,4 +1,4 @@ -// error-pattern:assigning to immutable alias +// error-pattern:assigning to upvar // Make sure that nesting a block within a lambda doesn't let us // mutate upvars from a lambda. fn main() { |
