]> git.lizzy.rs Git - rust.git/commit
Dataflow changes and associated borrowck fix.
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Sat, 11 Apr 2015 16:42:33 +0000 (18:42 +0200)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Wed, 15 Apr 2015 16:16:40 +0000 (18:16 +0200)
commit1702098e6f0717cd593cc88bf0463de8bc26ba9d
treeee1bcde309f79ed62937526ee3fdb37c58997b4a
parenta9d8065633be69847e1a5b16f952467f43951b65
Dataflow changes and associated borrowck fix.

Revise rustc::middle::dataflow: one must select kill-kind when calling
add_kill. The current kill-kinds are (1.) kills associated with
ends-of-scopes and (2.) kills associated with the actual action of the
expression/pattern.

Then, use this to fix borrowck analysis so that it will not treat a
break that pops through an assignment `x = { ... break; ... }` as a
kill of the "moved-out" bit for `x`.

Fix #24267.

(incorporated review feedback.)
src/librustc/middle/dataflow.rs
src/librustc_borrowck/borrowck/mod.rs
src/librustc_borrowck/borrowck/move_data.rs