rust/src/librustc_mir
bors 86e548747b Auto merge of #45025 - pnkfelix:mir-borrowck-moves-of-supporting-prefixes-invalidate-uses-too, r=arielb1
MIR-borrowck: moves of prefixes invalidate uses too

I overlooked the fact that when we check if a path is moved, we need to check for interference between the (shallow) prefixes and the use in question.

~~Long term, we may want to revise how this computation is done. For example, it might be better to represent the set of invalidated prefixes in the dataflow computation (the `maybe_uninitialized` dataflow), and thus avoid one of the loops in the code here.~~
 * Update: I was wrong in my original recollection of the dataflow code, which actually does the right thing, in terms of precisely tracking substructure initialization and movement.

Fix #44833

----

Update: The initial version of this PR's description (and the code as well) erroneously focused on supporting prefixes. ~~But the two main cases of interest are: 1. the *shallow* prefixes, and 2. the deref-free prefix built off a local (if the lvalue is indeed built off a local)~~

Update 2: The main cases of interest are in fact: 1. the nearest prefix with a MovePath, and 2. the suffixes.
2017-10-13 04:00:55 +00:00
..
build Expand mir dump in order to handle NLL pass 2017-10-04 23:45:09 -04:00
dataflow Auto merge of #45016 - pnkfelix:mir-borrowck-gather-and-signal-move-errors, r=nikomatsakis 2017-10-08 18:12:26 +00:00
hair Auto merge of #44809 - arielb1:small-scope, r=eddyb 2017-09-25 12:52:02 +00:00
transform Auto merge of #45013 - chrisvittal:mir_pretty_printing_pr, r=nikomatsakis 2017-10-13 01:33:34 +00:00
util Auto merge of #45013 - chrisvittal:mir_pretty_printing_pr, r=nikomatsakis 2017-10-13 01:33:34 +00:00
borrow_check.rs Auto merge of #45025 - pnkfelix:mir-borrowck-moves-of-supporting-prefixes-invalidate-uses-too, r=arielb1 2017-10-13 04:00:55 +00:00
Cargo.toml Generate Idx in nll using newtype_index! 2017-10-04 23:50:53 -03:00
diagnostics.rs Move E0509 diagnostic into mod borrowck_errors shared between ast- and mir-borrowck. 2017-10-04 12:47:53 +02:00
lib.rs Generate DepNodeIndexNew using newtype_index macro 2017-10-04 23:51:43 -03:00
shim.rs add lint levels to VisibilityScope 2017-09-24 12:46:00 +03:00