about summary refs log tree commit diff
path: root/src/librustc_mir
AgeCommit message (Collapse)AuthorLines
2019-04-28Remove unused TyCtxt argument from allow_two_phase_borrow functionflip1995-9/+6
2019-04-28Fix lint findings in librustc_mirflip1995-41/+41
2019-04-28Fix lint findings in librustcflip1995-4/+4
2019-04-28Implement internal lintsflip1995-1/+1
- USAGE_OF_QUALIFIED_TY - TY_PASS_BY_REFERENCE
2019-04-28Remove unnecessary functionYuki OKUSHI-7/+2
2019-04-28Remove two-phase-beyond-autorefYuki OKUSHI-3/+1
2019-04-27Rollup merge of #60292 - varkor:ty-tuple-substs, r=nikomatsakisMazdak Farrokhzad-10/+14
Replace the `&'tcx List<Ty<'tcx>>` in `TyKind::Tuple` with `SubstsRef<'tcx>` Part of the suggested refactoring for https://github.com/rust-lang/rust/issues/42340. As expected, this is a little messy, because there are many places that the components of tuples are expected to be types, rather than arbitrary kinds. However, it should open up the way for a refactoring of `TyS` itself. r? @nikomatsakis
2019-04-27Auto merge of #59540 - Zoxc:the-arena-2, r=michaelwoeristerbors-12/+7
Use arenas to avoid Lrc in queries #1 Based on https://github.com/rust-lang/rust/pull/59536.
2019-04-26Update handling of Tuplevarkor-10/+14
2019-04-25Update mir_const_qualifJohn Kåre Alsaker-7/+4
2019-04-25Update region_scope_treeJohn Kåre Alsaker-5/+3
2019-04-25Introduce hir::ExprKind::Use and employ in for loop desugaring.Mazdak Farrokhzad-0/+3
Here, ExprKind::Use(P<Expr>) tweaks the drop order to act the same way as '{ let _tmp = expr; _tmp }' does.
2019-04-24Evaluate hair::ExprKind::Use in intoMatthew Jasper-6/+5
This avoids some unnecessary moves
2019-04-24Allow subtyping of the final expression of a constantMatthew Jasper-5/+28
Fixes an ICE for the following code: fn foo(_ : &()) {} static X: fn(&'static ()) = foo;
2019-04-24Remove incorrect debug assertion in interpretMatthew Jasper-2/+1
Cast type may be a subtype of the destination type. There is a later assertion that they have the same layout.
2019-04-24Rollup merge of #59739 - cramertj:stabilize, r=withoutboatsMazdak Farrokhzad-2/+6
Stabilize futures_api cc https://github.com/rust-lang/rust/issues/59725. Based on https://github.com/rust-lang/rust/pull/59733 and https://github.com/rust-lang/rust/pull/59119 -- only the last two commits here are relevant. r? @withoutboats , @oli-obk for the introduction of `rustc_allow_const_fn_ptr`.
2019-04-24Rollup merge of #56278 - eddyb:mir-debuginfo-proof, r=nikomatsakisMazdak Farrokhzad-168/+267
Future-proof MIR for dedicated debuginfo. This is #56231 without the last commit (the one that actually moves to `VarDebuginfo`). Nothing should be broken, but it should no longer depend on debuginfo for anything else. r? @nikomatsakis
2019-04-23Add rustc_allow_const_fn_ptrTaylor Cramer-2/+6
2019-04-23rustc_mir: create the `let` and "remainder" scopes in source order.Eduard-Mihai Burtescu-2/+3
2019-04-23rustc_mir: pretty-print all locals into their respective scopes.Eduard-Mihai Burtescu-74/+52
2019-04-23rustc_mir: don't rely on mir::LocalDecl `visibility_scope`s in the MIR borrowck.Eduard-Mihai Burtescu-5/+1
2019-04-23rustc: dissuade compiler developers from misusing upvar debuginfo.Eduard-Mihai Burtescu-12/+12
2019-04-23rustc_mir: don't use upvar_decls in the miri validity checks.Eduard-Mihai Burtescu-6/+22
2019-04-23rustc_mir: don't use upvar_decls in the generator state transform.Eduard-Mihai Burtescu-5/+5
2019-04-23rustc: don't track var_hir_id or mutability in mir::UpvarDecl.Eduard-Mihai Burtescu-10/+15
2019-04-23Rollup merge of #59823 - davidtwco:issue-54716, r=cramertjMazdak Farrokhzad-0/+1
[wg-async-await] Drop `async fn` arguments in async block Fixes #54716. This PR modifies the HIR lowering (and some other places to make this work) so that unused arguments to a async function are always dropped inside the async move block and not at the end of the function body. ``` async fn foo(<pattern>: <type>) { async move { } } // <-- dropped as you "exit" the fn // ...becomes... fn foo(__arg0: <ty>) { async move { let <pattern>: <ty> = __arg0; } // <-- dropped as you "exit" the async block } ``` However, the exact ordering of drops is not the same as a regular function, [as visible in this playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=be39af1a58e5d430be1eb3c722cb1ec3) - I believe this to be an unrelated issue. There is a [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-t-compiler.2Fwg-async-await/topic/.2354716.20drop.20order) for this. r? @cramertj cc @nikomatsakis
2019-04-23rustc_mir: don't rely on mir::UpvarDecl in the MIR borrowck.Eduard-Mihai Burtescu-56/+159
2019-04-23Auto merge of #60125 - estebank:continue-evaluating, r=oli-obkbors-6/+29
Don't stop evaluating due to errors before borrow checking r? @oli-obk Fix #60005. Follow up to #59903. Blocked on #53708, fixing the ICE in `src/test/ui/consts/match_ice.rs`.
2019-04-22review comment: add HACK commentEsteban Küber-0/+2
2019-04-22Fix ICE related to #53708Esteban Küber-4/+21
2019-04-22Never stop due to errors before borrow checkingEsteban Küber-2/+6
2019-04-22Remove double trailing newlinesvarkor-2/+0
2019-04-21Enable migrate mode by default on the 2015 editionMatthew Jasper-162/+142
This also fully stabilizes two-phase borrows on all editions
2019-04-21Remove mutability from `Def::Static`Vadim Petrochenkov-3/+3
2019-04-21Change return type of `TyCtxt::is_static` to boolVadim Petrochenkov-14/+13
Add `TyCtxt::is_mutable_static`
2019-04-21Introduce `LocalSource` into the AST.David Wood-0/+1
This will be used to keep track of the origin of a local in the AST. In particular, it will be used by `async fn` lowering for the locals in `let <pat>: <ty> = __arg0;` statements.
2019-04-21Auto merge of #60116 - RalfJung:miri-exit, r=oli-obkbors-0/+1
add Miri error variant for process exit This is to support https://github.com/rust-lang/miri/pull/702 r? @oli-obk
2019-04-20Auto merge of #59987 - saleemjaffer:refactor_adjust_castkinds, r=oli-obkbors-118/+81
Refactor Adjust and CastKind fixes rust-lang#59588
2019-04-19add Miri error variant for process exitRalf Jung-0/+1
2019-04-19Auto merge of #60063 - spastorino:place2_2, r=oli-obkbors-254/+204
Convert Place unroll to a proper iterator r? @oli-obk
2019-04-18Auto merge of #60025 - JohnTitor:rename-files, r=petrochenkovbors-1/+1
Rename files about error codes fixes #60017 This PR will be failed in tidy. <details> <summary>The log is here:</summary> ``` tidy check tidy error: duplicate error code: 411 tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:83: __diagnostic_used!(E0411); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:84: err.code(DiagnosticId::Error("E0411".to_owned())); tidy error: duplicate error code: 424 tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:90: debug!("smart_resolve_path_fragment: E0424, source={:?}", source); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:92: __diagnostic_used!(E0424); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:93: err.code(DiagnosticId::Error("E0424".to_owned())); some tidy checks failed ``` </details> I'd like to fix this but I don't know what to do. I will work on later. Please let me know if you have any solutions. r? @petrochenkov
2019-04-18Add a FIXME to collectorvarkor-0/+2
2019-04-18Add own_requires_monomorphizationvarkor-4/+2
2019-04-18making adjust_span a closureSaleem Jaffer-22/+22
2019-04-17Make iterate take a FnOnce with PlaceBase and PlaceProjectionIterSantiago Pastorino-178/+202
2019-04-17Place::iterate do not take an accumulator anymore, hide that in a private fnSantiago Pastorino-2/+2
2019-04-17Place::unroll -> Place::iterateSantiago Pastorino-2/+2
2019-04-17Move unroll_place to Place::unrollSantiago Pastorino-79/+5
2019-04-17code review fixesSaleem Jaffer-25/+24
2019-04-17Rename modulesYuki OKUSHI-1/+1