new borrow checker (mass squash)

This commit is contained in:
Niko Matsakis 2013-03-15 15:24:24 -04:00
parent b5a7e8b353
commit a896440ca1
172 changed files with 6475 additions and 4303 deletions

View file

@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// error-pattern:assigning to captured outer immutable variable in a stack closure
// Make sure that nesting a block within a @fn doesn't let us
// mutate upvars from a @fn.
fn f2(x: &fn()) { x(); }
@ -16,6 +15,7 @@ fn f2(x: &fn()) { x(); }
fn main() {
let i = 0;
let ctr: @fn() -> int = || { f2(|| i = i + 1 ); i };
//~^ ERROR cannot assign
error!(ctr());
error!(ctr());
error!(ctr());