about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/thir.rs
AgeCommit message (Collapse)AuthorLines
2022-02-20Revert "Auto merge of #93800 - b-naber:static-initializers-mir-val, r=oli-obk"Mark Rousskov-3/+1
This reverts commit a240ccd81c74c105b6f5fe84c46f8d36edb7e306, reversing changes made to 393fdc10483da930cdbb00eabc3635030d2e776f. This PR was likely responsible for a relatively large regression in dist-x86_64-msvc-alt builder times, from approximately 1.7 to 2.8 hours, bringing that builder into the pool of the slowest builders we currently have. This seems to be limited to the alt builder due to needing parallel-compiler enabled, likely leading to slow LLVM compilation for some reason.
2022-02-15try to bless 32bit mir tests manuallyb-naber-5/+1
2022-02-15use AllocId and Ty in ExprKind::StaticRef and delay ConstValue constructionb-naber-2/+8
2022-02-15Overhaul `Const`.Nicholas Nethercote-8/+8
Specifically, rename the `Const` struct as `ConstS` and re-introduce `Const` as this: ``` pub struct Const<'tcx>(&'tcx Interned<ConstS>); ``` This now matches `Ty` and `Predicate` more closely, including using pointer-based `eq` and `hash`. Notable changes: - `mk_const` now takes a `ConstS`. - `Const` was copy, despite being 48 bytes. Now `ConstS` is not, so need a we need separate arena for it, because we can't use the `Dropless` one any more. - Many `&'tcx Const<'tcx>`/`&Const<'tcx>` to `Const<'tcx>` changes - Many `ct.ty` to `ct.ty()` and `ct.val` to `ct.val()` changes. - Lots of tedious sigil fiddling.
2022-01-18Formally implement let chainsCaio-1/+1
2022-01-12Remove deprecated LLVM-style inline assemblyTomasz Miąsko-6/+0
2022-01-11Store a `Symbol` instead of an `Ident` in `VariantDef`/`FieldDef`Aaron Hill-2/+2
The field is also renamed from `ident` to `name. In most cases, we don't actually need the `Span`. A new `ident` method is added to `VariantDef` and `FieldDef`, which constructs the full `Ident` using `tcx.def_ident_span()`. This method is used in the cases where we actually need an `Ident`. This makes incremental compilation properly track changes to the `Span`, without all of the invalidations caused by storing a `Span` directly via an `Ident`.
2021-09-09rename mir -> thir around abstract constsEllen-243/+3
2021-09-09move thir visitor to rustc_middleEllen-0/+243
2021-09-01Fix drop handling for `if let` expressionsMatthew Jasper-0/+1
MIR lowering for `if let` expressions is now more complicated now that `if let` exists in HIR. This PR adds a scope for the variables bound in an `if let` expression and then uses an approach similar to how we handle loops to ensure that we reliably drop the correct variables.
2021-08-25Various pattern cleanupsLéo Lanteri Thauvin-12/+4
2021-08-15Introduce hir::ExprKind::Let - Take 2Caio-0/+4
2021-06-22Add documentation for various THIR structsLeSeulArtichaut-35/+109
2021-06-21Fix unused_unsafe with compiler-generated unsafeCameron Steffen-0/+1
2021-06-18Auto merge of #85421 - Smittyvb:rm_pushpop_unsafe, r=matthewjasperbors-2/+0
Remove some last remants of {push,pop}_unsafe! These macros have already been removed, but there was still some code handling these macros. That code is now removed.
2021-06-13Box `ExprKind::Adt`LeSeulArtichaut-13/+16
2021-06-06Remove some last remants of {push,pop}_unsafe!Smitty-2/+0
These macros have already been removed, but there was still some code handling these macros. That code is now removed.
2021-05-22Make THIR building a stealable queryLeSeulArtichaut-20/+24
2021-05-22Move THIR structure definitions to `rustc_middle`LeSeulArtichaut-0/+743