]> git.lizzy.rs Git - rust.git/commit
rustc: Prevent repeated moves out of proc upvars
authorAlex Crichton <alex@alexcrichton.com>
Tue, 8 Apr 2014 23:59:18 +0000 (16:59 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 9 Apr 2014 00:10:47 +0000 (17:10 -0700)
commit767ed1a71f07e869e07bde138845e16b320908ec
treee96b834b8465a301d6819e0fecd0d522984c7121
parent02f51211eddbbaf6c6e02cecc78957ce1d5b4600
rustc: Prevent repeated moves out of proc upvars

This fixes the categorization of the upvars of procs (represented internally
as once fns) to consider usage to require a loan. In doing so, upvars are no
longer allowed to be moved out of repeatedly in loops and such.

Closes #10398
Closes #12041
Closes #12127
src/librustc/middle/borrowck/mod.rs
src/test/compile-fail/issue-10398.rs [new file with mode: 0644]
src/test/compile-fail/issue-11925.rs
src/test/compile-fail/issue-12041.rs [new file with mode: 0644]
src/test/compile-fail/issue-12127.rs [new file with mode: 0644]