about summary refs log tree commit diff
path: root/src/libsyntax/errors
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-05-25 12:34:39 -0700
committerbors <bors@rust-lang.org>2016-05-25 12:34:39 -0700
commit34fd68668152530dcd1d00865fa8514461b895d7 (patch)
tree19b2508db4e9e9f4bc21e8adfef2214c0f021bf6 /src/libsyntax/errors
parentda66f2fd8cab261911163ece04d5c15a13cf5e58 (diff)
parentdf5c116250657daa98da84eebe1b44a495abf5c0 (diff)
downloadrust-34fd68668152530dcd1d00865fa8514461b895d7.tar.gz
rust-34fd68668152530dcd1d00865fa8514461b895d7.zip
Auto merge of #33667 - pnkfelix:fixes-to-mir-dataflow, r=arielb1
Fixes to mir dataflow

Fixes to mir dataflow

This collects a bunch of changes to `rustc_borrowck::borrowck::dataflow` (which others have pointed out should probably migrate to some crate that isn't tied to the borrow-checker -- but I have not attempted that here, especially since there are competing approaches to dataflow that we should also evaluate).

These changes:
 1. Provide a family of related analyses: MovingOutStatements (which is what the old AST-based dataflo computed), as well as MaybeInitialized, MaybeUninitalized, and DefinitelyInitialized.
   * (The last two are actually inverses of each other; we should pick one and drop the other.)
 2. Fix bugs in the pre-existing analysis implementation, which was untested and thus some obvious bugs went unnoticed, which brings us to the third point:
 3. Add a unit test infrastructure for the MIR dataflow analysis.
   * The tests work by adding a new intrinsic that is able to query the analysis state for a particular expression (technically, a particular L-value).
   * See the examples in compile-fail/mir-dataflow/inits-1.rs and compile-fail/mir-dataflow/uninits-1.rs
   * These tests are only checking the results for MaybeInitialized, MaybeUninitalized, and DefinitelyInitialized; I am not sure if it will be feasible to generalize this testing strategy to the MovingOutStatements dataflow operator.
Diffstat (limited to 'src/libsyntax/errors')
0 files changed, 0 insertions, 0 deletions