diff options
Diffstat (limited to 'src/test/compile-fail/lambda-mutate-nested.rs')
| -rw-r--r-- | src/test/compile-fail/lambda-mutate-nested.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/compile-fail/lambda-mutate-nested.rs b/src/test/compile-fail/lambda-mutate-nested.rs index 0a733687aa3..2117eeefe8b 100644 --- a/src/test/compile-fail/lambda-mutate-nested.rs +++ b/src/test/compile-fail/lambda-mutate-nested.rs @@ -1,11 +1,11 @@ // error-pattern:assigning to upvar -// Make sure that nesting a block within a lambda doesn't let us -// mutate upvars from a lambda. +// Make sure that nesting a block within a fn@ doesn't let us +// mutate upvars from a fn@. fn f2(x: block()) { x(); } fn main() { let i = 0; - let ctr = lambda () -> int { f2({|| i = i + 1; }); ret i; }; + let ctr = fn@ () -> int { f2({|| i = i + 1; }); ret i; }; log(error, ctr()); log(error, ctr()); log(error, ctr()); |
