summary refs log tree commit diff
path: root/src/librustc_mir/dataflow/move_paths
AgeCommit message (Collapse)AuthorLines
2020-01-13Don't suppress move errors for union fieldsMatthew Jasper-9/+22
2019-12-09Remove `uniform_array_move_out` passesMatthew Jasper-38/+93
These passes were buggy, MIR building is now responsible for canonicalizing `ConstantIndex` projections and `MoveData` is responsible for splitting `Subslice` projections.
2019-12-09Make const index and subslice array projections more usefulMatthew Jasper-4/+5
* `min_length` is now exact for const index elements. * const index elements are always from the start. * make array `Subslice` `PlaceElems` count both `from` and `to` from the start.
2019-10-22Move Place::elem methods and friends to TyCtxtSantiago Pastorino-1/+1
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