about summary refs log tree commit diff
path: root/src/librustc_mir/dataflow/move_paths
AgeCommit message (Collapse)AuthorLines
2019-10-22Intern place projectionSantiago Pastorino-3/+3
2019-10-22Pattern match over PlaceRef rather than PlaceSantiago Pastorino-1/+1
This prepares the code base for when projection is interned. Place's projection field is going to be `&List<PlaceElem<'tcx>>` so we won't be able to pattern match against it.
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-5/+5
2019-09-25Rename `sty` to `kind`varkor-2/+2
2019-09-11Make Place Boxed on Statement to reduce size from 64 bytes to 32 bytesSantiago Pastorino-1/+1
2019-09-09Use slice patterns to match projection baseSantiago Pastorino-2/+1
2019-09-09Convert Place's projection to a boxed sliceSantiago Pastorino-83/+81
2019-09-04Rustfmt the files I touchedAlbin Stjerna-135/+147
2019-09-04Polonius: emit initialization/move tracking factsAlbin Stjerna-1/+8
- var_starts_path - parent - initialized_at - moved_out_at This also switches to the intended emission of `var_drop_used` fact emission, where that fact is always emitted on a drop-use of a variable, regardless of its initialization status, as Polonius now handles that.
2019-08-24Allow lifetime parameters to be inferredSantiago Pastorino-1/+1
2019-07-22Place::as_place_ref is now Place::as_refSantiago Pastorino-5/+5
2019-07-20Avoid unneeded else branchesSantiago Pastorino-22/+13
2019-07-20Avoid cloning Place in gather_initSantiago Pastorino-13/+13
2019-07-20Avoid cloning Place in report_use_of_moved_or_uninitialized and friendsSantiago Pastorino-3/+3
2019-07-20Migrate from Place enum to Place structSantiago Pastorino-14/+34
2019-06-25Implement From<Local> for Place and PlaceBaseSantiago Pastorino-3/+3
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-2/+2
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-15/+15
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-3/+5
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-4/+4
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-2/+2
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-4/+4
2019-06-09Changed usages of `mir` in librustc::mir and librustc_mir to `body`Jad Ghalayini-22/+22
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-6/+6
The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool. Revisions asked by eddyb : - Renamed of all the occurences of {visit/super}_mir - Renamed test structures `CachedMir` to `Cached` Fixing the missing import on `AggregateKind`
2019-05-26Make move_path_for iterate instead of recurseSantiago Pastorino-14/+27
2019-05-25Inline move_path_for_projection inside move_path_forSantiago Pastorino-61/+53
2019-05-25Auto merge of #61151 - Centril:rollup-5rpyhfo, r=Centrilbors-13/+14
Rollup of 6 pull requests Successful merges: - #61092 (Make sanitize_place iterate instead of recurse) - #61093 (Make borrow_of_local_data iterate instead of recurse) - #61094 (Make find_local iterate instead of recurse) - #61099 (Make ignore_borrow iterate instead of recurse) - #61103 (Make find iterate instead of recurse) - #61104 (Make eval_place_to_op iterate instead of recurse) Failed merges: r? @ghost
2019-05-24Make find iterate instead of recurseSantiago Pastorino-13/+14
2019-05-24Make place projections concrete.Edd Barrett-1/+1
Once upon a time (commit 9bd35c07c26) there were two kinds of projection: one for places, and one for constants. It therefore made sense to share the `Projection` struct for both. Although the different use-cases used different concrete types, sharing was made possible by type-parameterisation of `Projection`. Since then, however, the usage of projections in constants has disappeared, meaning that (forgetting lifetimes for a moment) the parameterised type is only every instantiated under one guise. So it may as well be a concrete type.
2019-04-28Fix lint findings in librustc_mirflip1995-3/+3
2019-04-13Auto merge of #59612 - matthewjasper:dataflow-usual-newtype-index, r=estebankbors-57/+14
Use normal newtype_index macro for MIR dataflows * Makes the definition of these structs contain `struct IndexName` * Avoids having an offset by removing high values, rather than 0 * Implements some traits for us.
2019-04-03Deny internal lints on librustc_mirflip1995-1/+1
2019-04-03Rollup merge of #59630 - nnethercote:shrink-mir-Statement, r=pnkfelixMazdak Farrokhzad-3/+3
Shrink `mir::Statement`. The `InlineAsm` variant is extremely rare, and `mir::Statement` often contributes significantly to peak memory usage.
2019-04-03Shrink `mir::Statement`.Nicholas Nethercote-3/+3
The `InlineAsm` variant is extremely rare, and `mir::Statement` often contributes significantly to peak memory usage.
2019-04-02Remove adt_def from PlaceTy and make it a structTyler Mandry-2/+2
2019-04-02Replace adt_def with name in mir::ProjectionElem::DowncastTyler Mandry-8/+7
2019-04-01Use normal newtype_index macro for MIR dataflowMatthew Jasper-57/+14
2019-03-18promoted is still left in 2 placesSaleem Jaffer-2/+0
2019-03-08expand unused doc comment diagnosticAndy Russell-12/+24
Report the diagnostic on macro expansions, and add a label indicating why the comment is unused.
2019-03-01Put Local, Static and Promoted as one Base variant of PlaceSantiago Pastorino-11/+11
2019-02-10rustc: doc commentsAlexander Regueiro-5/+5
2019-02-08librustc_mir => 2018Taiki Endo-8/+11
2018-12-25Remove licensesMark Rousskov-31/+0
2018-12-18treat ref-to-raw cast like a reborrow: do a special kind of retagRalf Jung-1/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-01remove some uses of try!Mark Mansi-1/+1
2018-11-18Remove mir::StatementKind::EndRegionMatthew Jasper-1/+0
Since lexical MIR borrow check is gone, and validation no longer uses these, they can be removed.
2018-11-15Auto merge of #55716 - RalfJung:escape-to-raw, r=oli-obkbors-1/+2
Add escape-to-raw MIR statement Add a new MIR "ghost state statement": Escaping a ptr to permit raw accesses. ~~This includes #55549, [click here](https://github.com/RalfJung/rust/compare/miri-visitor...RalfJung:escape-to-raw) for just the new commits.~~
2018-11-11Auto merge of #55657 - davidtwco:issue-55651, r=pnkfelixbors-0/+14
NLL Diagnostic Review 3: Unions not reinitialized after assignment into field Fixes #55651, #55652. This PR makes two changes: First, it updates the dataflow builder to add an init for the place containing a union if there is an assignment into the field of that union. Second, it stops a "use of uninitialized" error occuring when there is an assignment into the field of an uninitialized union that was previously initialized. Making this assignment would re-initialize the union, as tested in `src/test/ui/borrowck/borrowck-union-move-assign.nll.stderr`. The check for previous initialization ensures that we do not start supporting partial initialization yet (cc #21232, #54499, #54986). This PR also fixes #55652 which was marked as requiring investigation as the changes in this PR add an error that was previously missing (and mentioned in the review comments) and confirms that the error that was present is correct and a result of earlier partial initialization changes in NLL. r? @pnkfelix (due to earlier work with partial initialization) cc @nikomatsakis
2018-11-07no more action on ref or cast, but add new MIR statement for escaping a ptr ↵Ralf Jung-1/+2
to raw