summary refs log tree commit diff
path: root/compiler/rustc_middle/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2022-08-15Revert let_chains stabilizationNilstrieb-1/+1
This reverts commit 326646074940222d602f3683d0559088690830f4. It was discovered that they are not implemented correctly, which does not make them ready for stabilization.
2022-07-16Stabilize `let_chains`Caio-1/+1
2022-07-09don't allow ZST in ScalarIntRalf Jung-0/+1
There are several indications that we should not ZST as a ScalarInt: - We had two ways to have ZST valtrees, either an empty `Branch` or a `Leaf` with a ZST in it. `ValTree::zst()` used the former, but the latter could possibly arise as well. - Likewise, the interpreter had `Immediate::Uninit` and `Immediate::Scalar(Scalar::ZST)`. - LLVM codegen already had to special-case ZST ScalarInt. So instead add new ZST variants to those types that did not have other variants which could be used for this purpose.
2022-06-11Try out `yeet` in the MIR interpreterScott McMurray-0/+1
2022-06-03Fully stabilize NLLJack Huey-1/+0
2022-05-27Finish bumping stage0Mark Rousskov-1/+0
It looks like the last time had left some remaining cfg's -- which made me think that the stage0 bump was actually successful. This brings us to a released 1.62 beta though.
2022-05-24Make Lazy not care about lifetimes until decodeMichael Goulet-0/+1
2022-05-20Remove `crate` visibility usage in compilerJacob Pratt-1/+0
2022-05-11Remove `PartialOrd`/`Ord` impl for `PlaceRef`Aaron Hill-0/+1
This is a new attempt at #93315. It removes one usage of the `Ord` impl for `DefId`, which should make it easier to eventually remove that impl.
2022-05-04Stabilize `bool::then_some`Josh Triplett-1/+0
2022-04-15Rollup merge of #94457 - jhpratt:stabilize-derive_default_enum, r=davidtwcoDylan DPC-1/+1
Stabilize `derive_default_enum` This stabilizes `#![feature(derive_default_enum)]`, as proposed in [RFC 3107](https://github.com/rust-lang/rfcs/pull/3107) and tracked in #87517. In short, it permits you to `#[derive(Default)]` on `enum`s, indicating what the default should be by placing a `#[default]` attribute on the desired variant (which must be a unit variant in the interest of forward compatibility). ```````@rustbot``````` label +S-waiting-on-review +T-lang
2022-04-11Add documentation for the semantics of MIR rvaluesJakob Degen-0/+1
2022-04-07Stabilize `derive_default_enum`Jacob Pratt-1/+1
2022-03-22remove [async output] from impl FutureMichael Goulet-0/+1
2022-03-08add `#[rustc_pass_by_value]` to more typeslcnr-0/+1
2022-03-01Add helper function to suggest multiple constraintsMaybe Waffle-0/+1
Add `rustc_middle::ty::suggest_constraining_type_params` that suggests adding multiple constraints. `suggest_constraining_type_param` now just forwards params to this new function.
2022-02-25Switch bootstrap cfgsMark Rousskov-1/+1
2022-02-16Move ty::print methods to Drop-based scope guardsMark Rousskov-0/+1
2022-02-01add a rustc::query_stability lintlcnr-0/+1
2022-01-09rustc_middle: Rename `Export` to `ModChild` and add some commentsVadim Petrochenkov-0/+1
Also rename `module_exports`/`export_map` to `module_reexports`/`reexport_map` for clarity.
2021-12-15Remove `in_band_lifetimes` from `rustc_middle`Aaron Hill-1/+0
See #91867 This was mostly straightforward. In several places, I take advantage of the fact that lifetimes are non-hygenic: a macro declares the 'tcx' lifetime, which is then used in types passed in as macro arguments.
2021-12-14Stabilize iter::zip.PFPoitras-1/+0
2021-12-13Avoid cloning refcounted types during foldingAlan Egerton-0/+1
2021-11-29std: Stabilize the `thread_local_const_init` featureAlex Crichton-1/+0
This commit is intended to follow the stabilization disposition of the FCP that has now finished in #84223. This stabilizes the ability to flag thread local initializers as `const` expressions which enables the macro to generate more efficient code for accessing it, notably removing runtime checks for initialization. More information can also be found in #84223 as well as the tests where the feature usage was removed in this PR. Closes #84223
2021-11-26Unwrap the results of type foldersLeSeulArtichaut-0/+1
Co-authored-by: Alan Egerton <eggyal@gmail.com>
2021-11-22Use `derive_default_enum` in the compilerJacob Pratt-0/+1
2021-10-28Revert "Add rustc lint, warning when iterating over hashmaps"Mark Rousskov-1/+0
2021-10-24Rollup merge of #89558 - lcnr:query-stable-lint, r=estebankMatthias Krüger-0/+1
Add rustc lint, warning when iterating over hashmaps r? rust-lang/wg-incr-comp
2021-10-16Adopt let_else across the compilerest31-0/+1
This performs a substitution of code following the pattern: let <id> = if let <pat> = ... { identity } else { ... : ! }; To simplify it to: let <pat> = ... { identity } else { ... : ! }; By adopting the let_else feature.
2021-10-15allow `potential_query_instability` everywherelcnr-0/+1
2021-10-05Auto merge of #89266 - cjgillot:session-ich, r=michaelwoeristerbors-1/+0
Move ICH to rustc_query_system Based on https://github.com/rust-lang/rust/pull/89183 The StableHashingContext does not need to be in rustc_middle. This PR moves it to rustc_query_system. This will avoid a dependency between rustc_ast_lowering and rustc_middle in https://github.com/rust-lang/rust/pull/89124.
2021-10-04Rollup merge of #87993 - kornelski:try_reserve_stable, r=joshtriplettJubilee-1/+0
Stabilize try_reserve Stabilization PR for the [`try_reserve` feature](https://github.com/rust-lang/rust/issues/48043#issuecomment-898040475).
2021-10-04Stabilize try_reserveKornel-1/+0
2021-10-03Fully remove rustc_middle::ich.Camille GILLOT-1/+0
2021-10-02Remove various unused feature gatesbjorn3-2/+0
2021-09-12Gather module items after lowering.Camille GILLOT-0/+1
2021-09-08Bump stage0 compiler to 1.56Mark Rousskov-1/+0
2021-09-07Rename rustc_mir to rustc_const_eval.Camille GILLOT-1/+1
2021-09-07Move the dataflow framework to its own crate.Camille GILLOT-0/+2
2021-09-02rustc_target: move `LayoutOf` to `ty::layout`.Eduard-Mihai Burtescu-0/+1
2021-08-25Use if-let guards in the codebaseLéo Lanteri Thauvin-0/+2
2021-08-18Remove box syntax from rustc_middleest31-1/+0
2021-08-07Auto merge of #87408 - kornelski:try_reserve_error, r=yaahcbors-0/+1
Hide allocator details from TryReserveError I think there's [no need for TryReserveError to carry detailed information](https://github.com/rust-lang/rust/issues/48043#issuecomment-825139280), but I wouldn't want that issue to delay stabilization of the `try_reserve` feature. So I'm proposing to stabilize `try_reserve` with a `TryReserveError` as an opaque structure, and if needed, expose error details later. This PR moves the `enum` to an unstable inner `TryReserveErrorKind` that lives under a separate feature flag. `TryReserveErrorKind` could possibly be left as an implementation detail forever, and the `TryReserveError` get methods such as `allocation_size() -> Option<usize>` or `layout() -> Option<Layout>` instead, or the details could be dropped completely to make try-reserve errors just a unit struct, and thus smaller and cheaper.
2021-08-05use zeroed allocation instead of eagerly initializing the memoryThe8472-0/+2
2021-07-24Hide allocator details from TryReserveErrorKornel-0/+1
2021-07-14use NonZeroU64 for AllocId to restore old type sizesRalf Jung-0/+1
2021-06-29Support allocation failures when interperting MIRSmitty-0/+1
Note that this breaks Miri. Closes #79601
2021-06-14stabilize `int_error_matching`Ethan Brierley-1/+0
2021-05-31Remove unused feature gatesbjorn3-2/+0
2021-05-26Specialize implementationsJacob Pratt-0/+1
Implementations in stdlib are now optimized as they were before.