about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/build
AgeCommit message (Collapse)AuthorLines
2020-11-15Rollup merge of #79036 - cjgillot:steal, r=oli-obkJonas Schievink-1/+1
Move Steal to rustc_data_structures.
2020-11-14Move Steal to rustc_data_structures.Camille GILLOT-1/+1
2020-11-09address reviewer commentsmark-5/+6
2020-11-07fix #72680 by explicitly checking for or-pattern before testmark-0/+10
2020-11-05Auto merge of #78638 - vn-ki:bindigs-after-at-issue-69971, r=oli-obkbors-0/+44
reverse binding order in matches to allow the subbinding of copyable fields in bindings after @ Fixes #69971 ### TODO - [x] Regression tests r? `@oli-obk`
2020-11-04`u128` truncation and sign extension are not just interpreter relatedoli-3/+2
2020-11-03review commentsVishnunarayan K I-10/+10
2020-11-03preserve bindings order for SomeVishnunarayan K I-5/+28
2020-11-02new fix method and update testsVishnunarayan K I-15/+23
2020-11-02reverse binding order in matches ...Vishnunarayan K I-1/+14
... to allow the subbinding of copyable fields in bindings after `@` Fixes #69971
2020-10-30Fix even more clippy warningsJoshua Nelson-30/+15
2020-10-27Add unsized_fn_params featureSantiago Pastorino-1/+1
2020-10-27Rollup merge of #78377 - LeSeulArtichaut:patch-docs, r=jonas-schievinkYuki Okushi-1/+1
Fix typo in debug statement
2020-10-25Fix typo in debug statementLeSeulArtichaut-1/+1
2020-10-21rustc_mir: support MIR-inlining #[track_caller] functions.Eduard-Mihai Burtescu-0/+1
2020-10-21rustc_mir: track inlined callees in SourceScopeData.Eduard-Mihai Burtescu-1/+2
2020-10-17Auto merge of #77124 - spastorino:const-exprs-rfc-2920, r=oli-obkbors-1/+7
Implement const expressions and patterns (RFC 2920) cc `@ecstatic-morse` `@lcnr` `@oli-obk` `@petrochenkov`
2020-10-17Remove unused cached_unreachable_block from MIR builderTomasz Miąsko-14/+0
2020-10-16Lower inline const down to MIRSantiago Pastorino-1/+7
2020-10-14documentation fixDing Xiang Fei-2/+3
2020-10-10Refactor how SwitchInt stores jump targetsJonas Schievink-31/+29
2020-10-05Auto merge of #77552 - ecstatic-morse:body-def-id, r=lcnrbors-1/+1
Replace `(Body, DefId)` with `Body` where possible Follow-up to #77430. I `grep`-ed for parameter lists in which a `Body` appeared within a few lines of a `DefId`, so it's possible that I missed some cases, but this should be pretty complete. Most of these changes were mechanical, but there's a few places where I started calling things "caller" and "callee" when multiple `DefId`s were in-scope at once. Also, we should probably have a helper function on `Body` that returns a `LocalDefId`. I can do that in this PR or in a follow-up.
2020-10-05Auto merge of #77466 - Aaron1011:reland-drop-tree, r=matthewjasperbors-726/+768
Re-land PR #71840 (Rework MIR drop tree lowering) PR https://github.com/rust-lang/rust/pull/71840 was reverted in https://github.com/rust-lang/rust/pull/72989 to fix an LLVM error (https://github.com/rust-lang/rust/issues/72470). That LLVM error no longer occurs with the recent upgrade to LLVM 11 (https://github.com/rust-lang/rust/pull/73526), so let's try re-landing this PR. I've cherry-picked the commits from the original PR (with the exception of the commit blessing test output), making as few modifications as possible. I addressed the rebase fallout in separate commits on top of those. r? `@matthewjasper`
2020-10-04Replace `(Body, DefId)` with `Body` where possibleDylan MacKenzie-1/+1
A `Body` now contains its `MirSource`, which in turn contains the `DefId` of the item associated with the `Body`.
2020-10-04HACK: Overwrite the MIR's source with the correct const paramDylan MacKenzie-1/+7
There's a cleaner way of doing this, but it involves passing `WithOptConstParam` around in more places. We're going to try to explore different approaches before committing to that.
2020-10-04Remember the `MirSource` for each `Body`Dylan MacKenzie-2/+9
2020-10-04Apply suggestions from reviewAaron Hill-2/+2
Co-authored-by: matthewjasper <20113453+matthewjasper@users.noreply.github.com>
2020-10-04Fix broken linkAaron Hill-1/+1
2020-10-04Fix rebase falloutAaron Hill-3/+3
2020-10-04Address review commentsMatthew Jasper-5/+5
2020-10-04Add some more commentsMatthew Jasper-7/+22
2020-10-04Defer creating drop trees in MIR lowering until leaving that scopeMatthew Jasper-726/+753
2020-09-21fix typo in docs and commentsyuk1ty-1/+1
2020-09-20Rollup merge of #76890 - matthiaskrgr:matches_simpl, r=lcnrRalf Jung-3/+2
use matches!() macro for simple if let conditions
2020-09-18use matches!() macro for simple if let conditionsMatthias Krüger-3/+2
2020-09-15don't convert types to the same type with try_into (clippy::useless_conversion)Matthias Krüger-1/+1
2020-09-07Add CONST_ITEM_MUTATION lintAaron Hill-1/+4
Fixes #74053 Fixes #55721 This PR adds a new lint `CONST_ITEM_MUTATION`. Given an item `const FOO: SomeType = ..`, this lint fires on: * Attempting to write directly to a field (`FOO.field = some_val`) or array entry (`FOO.array_field[0] = val`) * Taking a mutable reference to the `const` item (`&mut FOO`), including through an autoderef `FOO.some_mut_self_method()` The lint message explains that since each use of a constant creates a new temporary, the original `const` item will not be modified.
2020-09-04Change ty.kind to a methodLeSeulArtichaut-14/+14
2020-08-30mv compiler to compiler/mark-0/+8108