-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Extend rustc::middle::dataflow to allow filtering kills from flow-exits #24330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
oh I still need to add a regression test; I will do that shortly. |
@nikomatsakis (also, I am a little worried about the inefficiency introduced by this filter. I briefly searched for a more efficient encoding, but this was the easiest thing to put in quickly. We can discuss more during the week.) |
(i have now confirmed that this does pass |
(maybe I do indeed need to mark this as a |
per our discussion, it would be nicer to distinguish "lexical" kills from "action" kills, and then only kill "lexical" kills when breaking out |
f447d8a
to
1116ebe
Compare
(this is ready for a re-review) |
r+ modulo nits about dead code from before -- looks great! |
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 rust-lang#24267. (incorporated review feedback.)
⌛ Testing commit 77bf827 with merge e3eaf2c... |
💔 Test failed - auto-linux-64-nopt-t |
@bors: retry On Wed, Apr 15, 2015 at 1:11 PM, bors [email protected] wrote:
|
@alexcrichton any info or idea what was up with that failure? Residual files on the bot from another PR or something? |
Perhaps, I'm not quite sure... |
Extend rustc::middle::dataflow to allow filtering kills from flow-exits. Fix borrowck analysis so that it will not treat a break that pops through an assignment ```rust x = { ... break; ... } ``` as a kill of the "moved-out" bit for `x`. Fix #24267. [breaking-change], but really, its only breaking code that was already buggy.
Extend rustc::middle::dataflow to allow filtering kills from flow-exits.
Fix borrowck analysis so that it will not treat a break that pops through an assignment
as a kill of the "moved-out" bit for
x
.Fix #24267.
[breaking-change], but really, its only breaking code that was already buggy.