about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/build/expr/stmt.rs
AgeCommit message (Collapse)AuthorLines
2024-12-17Rename `rustc_mir_build::build` to `builder`Zalathar-196/+0
2024-11-20reduce false positives of tail-expr-drop-order from consumed valuesDing Xiang Fei-2/+11
take 2 open up coroutines tweak the wordings the lint works up until 2021 We were missing one case, for ADTs, which was causing `Result` to yield incorrect results. only include field spans with significant types deduplicate and eliminate field spans switch to emit spans to impl Drops Co-authored-by: Niko Matsakis <nikomat@amazon.com> collect drops instead of taking liveness diff apply some suggestions and add explantory notes small fix on the cache let the query recurse through coroutine new suggestion format with extracted variable name fine-tune the drop span and messages bugfix on runtime borrows tweak message wording filter out ecosystem types earlier apply suggestions clippy check lint level at session level further restrict applicability of the lint translate bid into nop for stable mir detect cycle in type structure
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-1/+1
the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-5/+5
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-17Rollup merge of #127472 - Zalathar:block-and-unit, r=fmeaseMatthias Krüger-1/+2
MIR building: Stop using `unpack!` for `BlockAnd<()>` This is a subset of #127416, containing only the parts related to `BlockAnd<()>`. The first patch removes the non-assigning form of the `unpack!` macro, because it is frustratingly inconsistent with the main form. We can replace it with an ordinary method that discards the `()` and returns the block. The second patch then finds all of the remaining code that was using `unpack!` with `BlockAnd<()>`, and updates it to use that new method instead. --- Changes since original review of #127416: - Renamed `fn unpack_block` → `fn into_block` - Removed `fn unpack_discard`, replacing it with `let _: BlockAnd<()> = ...` (2 occurrences) - Tweaked `arm_end_blocks` to unpack earlier and build `Vec<BasicBlock>` instead of `Vec<BlockAnd<()>>`
2024-07-08Stop using `unpack!` for `BlockAnd<()>`Zalathar-1/+2
2024-07-07Fix conflicts after rebaseMaybe Lapkin-1/+1
- r-l/r 126784 - r-l/r 127113 - r-l/miri 3562
2024-07-07Properly handle drops for tail callsDrMeepster-18/+22
2024-07-07Support tail calls in mir via `TerminatorKind::TailCall`Maybe Waffle-2/+33
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_mir_build`.Nicholas Nethercote-0/+1
2023-12-18Pass THIR ExprIds in MIR buildingMatthew Jasper-29/+17
2023-10-13Format all the let chains in compilerMichael Goulet-24/+23
2023-06-27`thir`: Add `Become` expression kindMaybe Waffle-0/+7
2023-03-03Desugars drop and replace at MIR buildGiacomo Pasini-1/+1
This commit desugars the drop and replace deriving from an assignment at MIR build, avoiding the construction of the DropAndReplace terminator (which will be removed in a followign PR) In order to retain the same error messages for replaces a new DesugaringKind::Replace variant is introduced.
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-5/+5
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-1/+1
2023-01-17tidyWaffle Maybe-1/+1
rustfmt, pleaaaaase, start supporting rust Co-authored-by: nils <48135649+Nilstrieb@users.noreply.github.com>
2023-01-17Don't call closures immediately, use `try{}` blocksMaybe Waffle-5/+5
2022-12-12Fixup method doc that mentions removed paramMaybe Waffle-4/+2
2022-08-24Store blocks in `Thir`.Nicholas Nethercote-7/+15
Like expressions, statements, and match arms. This shrinks `thir::Stmt` and is a precursor to further shrinking `thir::Expr`.
2022-05-20Remove `crate` visibility usage in compilerJacob Pratt-1/+1
2022-02-286 - Make more use of `let_chains`Caio-15/+13
Continuation of #94376. cc #53667
2022-01-12Remove deprecated LLVM-style inline assemblyTomasz Miąsko-32/+0
2021-08-18Remove box syntax from rustc_mir_buildest31-2/+2
2021-05-22Make THIR building a stealable queryLeSeulArtichaut-1/+1
2021-05-22Move THIR structure definitions to `rustc_middle`LeSeulArtichaut-1/+1
2021-05-19Store THIR in `IndexVec`s instead of an `Arena`LeSeulArtichaut-12/+22
2021-03-09Take into account `ExprKind::Scope` when calculating span of temporaryLeSeulArtichaut-6/+6
2021-03-09Remove useless references/dereferencesLeSeulArtichaut-20/+14
2021-03-09Make arena allocation for the THIR workLeSeulArtichaut-1/+1
2021-03-09Remove `Clone` impl for `thir::Expr`LeSeulArtichaut-4/+3
2021-03-09Pull `thir::Cx` out of the MIR `Builder`LeSeulArtichaut-1/+1
2021-03-09[WIP] Eagerly construct bodies of THIRLeSeulArtichaut-27/+32
2021-02-04Revert "Use `record_operands_moved` more aggresively"Felix S. Klock II-2/+0
This reverts commit 7f3e8551dde7f14641618cdb8fda2f99ff1d74b6.
2020-12-04Use `record_operands_moved` more aggresivelyMatthew Jasper-0/+2
2020-08-30mv compiler to compiler/mark-0/+175