about summary refs log tree commit diff
path: root/src/librustc_mir/dataflow/move_paths
AgeCommit message (Collapse)AuthorLines
2017-09-03rustc_mir: use Local in ProjectionElem::Index.Eduard-Mihai Burtescu-2/+5
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-318/+348
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-10/+10
2017-08-16MIR based borrow check (opt-in).Felix S. Klock II-0/+6
One can either use `-Z borrowck-mir` or add the `#[rustc_mir_borrowck]` attribute to opt into MIR based borrow checking. Note that regardless of whether one opts in or not, AST-based borrow check will still run as well. The errors emitted from AST-based borrow check will include a "(Ast)" suffix in their error message, while the errors emitted from MIR-based borrow check will include a "(Mir)" suffix. post-rebase: removed check for intra-statement mutual conflict; replaced with assertion checking that at most one borrow is generated per statement. post-rebase: removed dead code: `IdxSet::pairs` and supporting stuff.
2017-08-16Factored `MoveData` construction code into `builder` submodule.Felix S. Klock II-313/+334
2017-08-16Added dataflow analysis for `Borrows`.Felix S. Klock II-0/+3
post-rebase: addressed review comment: rename `loc_map`/`location_map` and `rgn_map`/`region_map`. post-rebase: remove now unnecessary `mut` decl. post-rebase: address comments: bind iterator expr, and alpha-rename `loc`/`location` and `idx`/`index`.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-10/+10
Like #43008 (f668999), but _much more aggressive_.
2017-08-12Merge branch 'master' of https://github.com/rust-lang/rust into genJohn Kåre Alsaker-0/+7
# Conflicts: # src/librustc_mir/build/scope.rs
2017-08-10For box expressions, use NZ drop instead of a free blockAriel Ben-Yehuda-0/+7
This falls naturally out of making drop elaboration work with `box` expressions, which is probably required for sane MIR borrow-checking. This is a pure refactoring with no intentional functional effects.
2017-08-09Merge remote-tracking branch 'origin/master' into genAlex Crichton-2/+10
2017-07-30add new instructions for asserting when values are valid, and to describe ↵Ralf Jung-0/+1
when we can rely on them being locked in memory
2017-07-28Remove support for `gen arg`Alex Crichton-1/+0
2017-07-28Rename suspend to yieldJohn Kåre Alsaker-1/+1
2017-07-28Generator literal supportJohn Kåre Alsaker-0/+6
2017-07-27erase types in the move-path abstract domainAriel Ben-Yehuda-2/+9
Leaving types unerased would lead to 2 types with a different "name" getting different move-paths, which would cause major brokenness (see e.g. #42903). This does not fix any *known* issue, but is required if we want to use abs_domain with non-erased regions (because the same can easily have different names). cc @RalfJung.
2017-07-26Rollup merge of #42959 - SimonSapin:nonzero-checked, r=sfacklerMark Simulacrum-1/+1
Make the "main" constructors of NonZero/Shared/Unique return Option Per discussion in https://github.com/rust-lang/rust/issues/27730#issuecomment-303939441. This is a breaking change to unstable APIs. The old behavior is still available under the name `new_unchecked`. Note that only that one can be `const fn`, since `if` is currently not allowed in constant contexts. In the case of `NonZero` this requires adding a new `is_zero` method to the `Zeroable` trait. I mildly dislike this, but it’s not much worse than having a `Zeroable` trait in the first place. `Zeroable` and `NonZero` are both unstable, this can be reworked later.
2017-07-23Fix some doc/comment typos.Bruce Mitchener-1/+1
2017-07-22Use checked NonZero constructor in MIR move path indicesSimon Sapin-1/+1
… to protect against UB in the unlikely case that `idx + 1` overflows.
2017-07-22Rename {NonZero,Shared,Unique}::new to new_uncheckedSimon Sapin-1/+1
2017-06-28Shift mir-dataflow from `rustc_borrowck` to `rustc_mir` crate.Felix S. Klock II-0/+593
Turn `elaborate_drops` and `rustc_peek` implementations into MIR passes that also live in `rustc_mir` crate. Rewire things so `rustc_driver` uses the `ElaborateDrops` from `rustc_mir` crate.