about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/builder/custom
AgeCommit message (Collapse)AuthorLines
2025-09-16Remove Rvalue::Len.Camille Gillot-1/+5
2025-08-18Rollup merge of #145206 - scrabsha:push-uxovoqzrxnlx, r=jdonszelmannStuart Cook-33/+32
Port `#[custom_mir(..)]` to the new attribute system r? ``````````@jdonszelmann``````````
2025-08-15Port `#[custom_mir(..)]` to the new attribute systemSasha Pourcelot-33/+32
2025-08-14avoid unnecessary type sanity checksRalf Jung-1/+1
2025-08-14use ty::Value instead of manual pairs of types and valtreesRalf Jung-3/+3
2025-08-14PatKind: store constants as valtreesRalf Jung-3/+3
2025-06-29mir: Add a `new` method to `statement`dianqk-4/+2
Avoid introducing a large number of changes when adding optional initialization fields.
2025-05-29Structurally normalize types as needed in projection_ty_coreMichael Goulet-2/+2
2025-04-28AsyncDrop implementation using shim codegen of ↵Andrew Zhogin-0/+2
async_drop_in_place::{closure}, scoped async drop added.
2025-04-17Replace infallible `name_or_empty` methods with fallible `name` methods.Nicholas Nethercote-1/+2
I'm removing empty identifiers everywhere, because in practice they always mean "no identifier" rather than "empty identifier". (An empty identifier is impossible.) It's better to use `Option` to mean "no identifier" because you then can't forget about the "no identifier" possibility. Some specifics: - When testing an attribute for a single name, the commit uses the `has_name` method. - When testing an attribute for multiple names, the commit uses the new `has_any_name` method. - When using `match` on an attribute, the match arms now have `Some` on them. In the tests, we now avoid printing empty identifiers by not printing the identifier in the `error:` line at all, instead letting the carets point out the problem.
2025-04-06Remove the `is_inline` field from `PatKind::ExpandedConstant`Nadrieril-1/+1
2025-02-19Remove `rustc_middle::mir::tcx` module.Nicholas Nethercote-1/+0
This is a really weird module. For example, what does `tcx` in `rustc_middle::mir::tcx::PlaceTy` mean? The answer is "not much". The top-level module comment says: > Methods for the various MIR types. These are intended for use after > building is complete. Awfully broad for a module that has a handful of impl blocks for some MIR types, none of which really relates to `TyCtxt`. `git blame` indicates the comment is ancient, from 2015, and made sense then. This module is now vestigial. This commit removes it and moves all the code within into `rustc_middle::mir::statement`. Some specifics: - `Place`, `PlaceRef`, `Rvalue`, `Operand`, `BorrowKind`: they all have `impl` blocks in both the `tcx` and `statement` modules. The commit merges the former into the latter. - `BinOp`, `UnOp`: they only have `impl` blocks in `tcx`. The commit moves these into `statement`. - `PlaceTy`, `RvalueInitializationState`: they are defined in `tcx`. This commit moves them into `statement` *and* makes them available in `mir::*`, like many other MIR types.
2025-01-31Remove the `mir_build` hook.Nicholas Nethercote-1/+1
It was downgraded from a query in #122721 but it can just be a vanilla function because it's not called in `rustc_middle`.
2025-01-28Represent the raw pointer for a array length check as a new kind of fake borrowMichael Goulet-1/+1
2025-01-18Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper"Rémy Rakic-0/+1
This reverts commit e108481f74ff123ad98a63bd107a18d13035b275, reversing changes made to 303e8bd768526a5812bb1776e798e829ddb7d3ca.
2024-12-22Delete `Rvalue::Len`Scott McMurray-1/+0
Everything's moved to `PtrMetadata` instead.
2024-12-18mir: require `is_cleanup` when creating `BasicBlockData`DianQK-7/+8
2024-12-17Rename `rustc_mir_build::build` to `builder`Zalathar-0/+909