about summary refs log tree commit diff
path: root/src/librustc_mir/build
AgeCommit message (Collapse)AuthorLines
2020-01-12Split `rustc_mir::{build, hair, lints}` into their own crateMatthew Jasper-7435/+0
2020-01-10Remove PlaceBase enum and make Place base field be local: LocalSantiago Pastorino-26/+18
2020-01-10Remove Static from PlaceBaseSantiago Pastorino-3/+3
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-12/+13
2020-01-04{HirId,ItemLocal}{Map,Set} -> rustc::hir & nix rustc::nodemapMazdak Farrokhzad-3/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-10/+10
2019-12-26Fallout in other crates.Camille GILLOT-5/+12
2019-12-25Use link in doc commentmatthewjasper-1/+2
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-12-25Split `match_expr` into smaller functionsMatthew Jasper-108/+164
2019-12-25Remove `-Znll-dont-emit-read-for-match`Matthew Jasper-7/+1
2019-12-25Reduce log level from info to debugMatthew Jasper-1/+1
2019-12-24x.py fmt after previous deignoreMark Rousskov-622/+438
2019-12-23refactor with extract_binding_modeMazdak Farrokhzad-7/+4
2019-12-22Format the worldMark Rousskov-949/+771
2019-12-22Rollup merge of #67499 - Centril:mir-match-clean, r=matthewjasperMazdak Farrokhzad-103/+49
Misc MIR building cleanups r? @matthewjasper
2019-12-21Use Arena inside hir::Body.Camille GILLOT-1/+1
2019-12-21Use Arena inside hir::ImplItem.Camille GILLOT-7/+1
2019-12-21Use Arena inside hir::TraitItem.Camille GILLOT-1/+4
2019-12-21Use Arena inside hir::Item.Camille GILLOT-0/+3
2019-12-21simplify MIR building with cfg.goto(...)Mazdak Farrokhzad-79/+29
2019-12-21misc cleanup in match MIR buildingMazdak Farrokhzad-24/+20
2019-12-20into: simplify AddressOf logic after rebaseMazdak Farrokhzad-9/+4
2019-12-201. ast::Mutability::{Mutable -> Mut, Immutable -> Not}.Mazdak Farrokhzad-3/+3
2. mir::Mutability -> ast::Mutability.
2019-12-18Start generating AddressOf rvalues in MIRMatthew Jasper-0/+21
`hir::BorrowKind::Raw` borrows and casting a reference to a raw pointer no longer do a reborrow followed by a cast. Instead we dereference and take the address.
2019-12-16Rollup merge of #67325 - Centril:push-fake-read, r=matthewjasperMazdak Farrokhzad-48/+23
cleanup with push_fake_read ...and make things a bit more readable. r? @matthewjasper
2019-12-15cleanup with push_fake_readMazdak Farrokhzad-48/+23
2019-12-15Fix repetition in matches/mod.rsMazdak Farrokhzad-2/+1
2019-12-11Auto merge of #66650 - matthewjasper:nonuniform-array-move, r=pnkfelixbors-8/+23
Remove uniform array move MIR passes This PR fixes a number of bugs caused by limitations of this pass * Projections from constant indexes weren't being canonicalized * Constant indexes from the start weren't being canonicalized (they could have different min_lengths) * It didn't apply to non-moves This PR makes the following changes to support removing this pass: * ConstantIndex of arrays are now generated in a canonical form (from the start, min_length is the actual length). * Subslices are now split when generating move paths and when checking subslices have been moved. Additionally * The parent move path of a projection from an array element is now calculated correctly closes #66502
2019-12-11Rollup merge of #67164 - matthewjasper:never-remove-const, r=oli-obkMazdak Farrokhzad-1/+8
Ensure that panicking in constants eventually errors based on #67134 closes #66975 r? @oli-obk
2019-12-09Make const index and subslice array projections more usefulMatthew Jasper-8/+23
* `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-12-09Ensure that unevaluated constants of type `!` are present in the MIRMatthew Jasper-1/+8
2019-12-08Rollup merge of #66991 - Nashenas88:body_cache_cleanup, r=eddybMazdak Farrokhzad-2/+2
Cleanup BodyCache After this PR: - `BodyCache` is renamed to `BodyAndCache` - `ReadOnlyBodyCache` is renamed to `ReadOnlyBodyAndCache` - `ReadOnlyBodyAndCache::body` fn is removed and all calls to it are replaced by a deref (possible due to fix of its `Deref` imp in #65947) cc @eddyb @oli-obk
2019-12-06Use `to_option` in various placesvarkor-2/+2
2019-12-05rustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded ↵Paul Daniel Faria-2/+2
Index impl, remove body fn rustc_codegen_ssa: Fix BodyAndCache reborrow to Body and change instances of body() call to derefence rustc_mir: Fix BodyAndCache reborrow to Body and change intances of body() call to derefence
2019-12-02Compute predecessors in mir_build query and use existing cache for ↵Paul Daniel Faria-1/+3
generating ReadOnlyBodyCache, remove unneeded fns
2019-12-02Simplify BodyCache impl and fix all remaining type errors in librustc_mir ↵Paul Daniel Faria-2/+2
(lifetime errors still exist)
2019-12-02Move predecessors cache invalidation back to basic_blocks_mut, add a couple ↵Paul Daniel Faria-2/+2
more ensure_predecessors to prevent panics
2019-12-02Stop invalidating predecessors cache when accessing unique basic block, ↵Paul Daniel Faria-2/+2
invalidate cache when accessing unique terminator
2019-12-02Rollup merge of #66789 - eddyb:mir-source-scope-local-data, r=oli-obkMazdak Farrokhzad-14/+18
rustc: move mir::SourceScopeLocalData to a field of SourceScopeData. By having one `ClearCrossCrate<SourceScopeLocalData>` for each scope, as opposed to a single `ClearCrossCrate` for all the `SourceScopeLocalData`s, we can represent the fact that some scopes have `SourceScopeLocalData` associated with them, and some don't. This is useful when doing MIR inlining across crates, because the `ClearCrossCrate` will be `Clear` for the cross-crate MIR scopes and `Set` for the local ones. Also see https://github.com/rust-lang/rust/pull/66203#issuecomment-555589574 for some context around this approach. Fixes #51314.
2019-11-30Rollup merge of #66612 - Nadrieril:or-patterns-initial, r=varkorMazdak Farrokhzad-1/+7
Initial implementation of or-pattern usefulness checking The title says it all. I'd like to request a perf run on that, hopefully this doesn't kill performance too much. cc https://github.com/rust-lang/rust/issues/54883
2019-11-30rustc: move mir::SourceScopeLocalData to a field of SourceScopeData.Eduard-Mihai Burtescu-14/+12
2019-11-30rustc: move MIR source_scope_local_data's ClearCrossCrate to be around elements.Eduard-Mihai Burtescu-7/+13
2019-11-28SquashDavid Haig-24/+31
2019-11-27Rollup merge of #66798 - bwignall:typo, r=varkorTyler Mandry-1/+1
Fix spelling typos Should be non-semantic. Uses https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines to find likely typos.
2019-11-27Rollup merge of #66722 - matthewjasper:non_exhaustive_borrowck, r=varkorTyler Mandry-1/+1
Handle non_exhaustive in borrow checking Borrow check can tell whether a pattern is exhaustive or not, make sure that `non_exhaustive` prevents this.
2019-11-27rustc: move debug info from LocalDecl and UpvarDecl into a dedicated ↵Eduard-Mihai Burtescu-83/+123
VarDebugInfo.
2019-11-26Fix spelling typosBrian Wignall-1/+1
2019-11-26Make the ice a fatal errorNadrieril-1/+7
2019-11-24Handle non_exhaustive in borrow checkingMatthew Jasper-1/+1