about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/move_paths
AgeCommit message (Collapse)AuthorLines
2025-09-26ProjectionElem::Subtype -> CastKind::Subtypebeepster4096-4/+1
2025-09-18Rollup merge of #146664 - fmease:clean-up-dyn, r=jdonszelmannStuart Cook-2/+2
Clean up `ty::Dynamic` 1. As a follow-up to PR rust-lang/rust#143036, remove `DynKind` entirely. 2. Inside HIR ty lowering, consolidate modules `dyn_compatibility` and `lint` into `dyn_trait` * `dyn_compatibility` wasn't about dyn compatibility itself, it's about lowering trait object types * `lint` contained dyn-Trait-specific diagnostics+lints only
2025-09-17Remove `DynKind`León Orell Valerian Liehr-2/+2
2025-09-16Remove Rvalue::Len.Camille Gillot-1/+0
2025-08-21Correct comments.Camille Gillot-11/+10
2025-08-21Introduce ProjectionElem::try_map.Camille GILLOT-45/+16
2025-02-22Greatly simplify lifetime captures in edition 2024Michael Goulet-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-02-03Contracts core intrinsics.Felix S. Klock II-1/+5
These are hooks to: 1. control whether contract checks are run 2. allow 3rd party tools to intercept and reintepret the results of running contracts.
2025-01-31Implement MIR, CTFE, and codegen for unsafe bindersMichael Goulet-2/+5
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-24Auto merge of #134625 - compiler-errors:unsafe-binders-ty, r=oli-obkbors-0/+2
Begin to implement type system layer of unsafe binders Mostly TODOs, but there's a lot of match arms that are basically just noops so I wanted to split these out before I put up the MIR lowering/projection part of this logic. r? oli-obk Tracking: - https://github.com/rust-lang/rust/issues/130516
2024-12-22Begin to implement type system layer of unsafe bindersMichael Goulet-0/+2
2024-12-22Delete `Rvalue::Len`Scott McMurray-1/+0
Everything's moved to `PtrMetadata` instead.
2024-12-11Simplify `rustc_mir_dataflow::abs_domain`.Nicholas Nethercote-37/+11
`rustc_mir_dataflow` has a typedef `AbstractElem` that is equal to `ProjectionElem<AbstractOperand, AbstractType>`. `AbstractOperand` and `AbstractType` are both unit types. There is also has a trait `Lift` to convert a `PlaceElem` to an `AbstractElem`. But `rustc_mir_middle` already has a typedef `ProjectionKind` that is equal to `ProjectionElem<(), ()>`, which is equivalent to `AbstractElem`. So this commit reuses `ProjectionKind` in `rustc_mir_dataflow`, removes `AbstractElem`, and simplifies the `Lift` trait.
2024-11-20reduce false positives of tail-expr-drop-order from consumed valuesDing Xiang Fei-0/+1
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-10-19Get rid of const eval_* and try_eval_* helpersMichael Goulet-14/+7
2024-10-06various fixes for `naked_asm!` implementationFolkert de Vries-0/+1
- fix for divergence - fix error message - fix another cranelift test - fix some cranelift things - don't set the NORETURN option for naked asm - fix use of naked_asm! in doc comment - fix use of naked_asm! in run-make test - use `span_bug` in unreachable branch
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-09-09Remove `Gatherer`.Nicholas Nethercote-46/+29
It's a very thin wrapper that pairs `MoveDataBuilder` with a `Location`, and it has four lifetime arguments. This commit removes it by just adding a `Location` to `MoveDataBuilder`.
2024-08-29Add `warn(unreachable_pub)` to `rustc_mir_dataflow`.Nicholas Nethercote-4/+4
2024-08-18rename AddressOf -> RawBorrow inside the compilerRalf Jung-1/+1
2024-08-09Shrink `TyKind::FnPtr`.Nicholas Nethercote-2/+2
By splitting the `FnSig` within `TyKind::FnPtr` into `FnSigTys` and `FnHeader`, which can be packed more efficiently. This reduces the size of the hot `TyKind` type from 32 bytes to 24 bytes on 64-bit platforms. This reduces peak memory usage by a few percent on some benchmarks. It also reduces cache misses and page faults similarly, though this doesn't translate to clear cycles or wall-time improvements on CI.
2024-07-29Reformat `use` declarations.Nicholas Nethercote-8/+8
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-07Support tail calls in mir via `TerminatorKind::TailCall`Maybe Waffle-0/+6
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_mir_dataflow`.Nicholas Nethercote-0/+1
2024-05-17Remove `Rvalue::CheckedBinaryOp`Scott McMurray-2/+1
2024-04-30Rollup merge of #124511 - nnethercote:rm-extern-crates, r=fee1-deadMatthias Krüger-0/+1
Remove many `#[macro_use] extern crate foo` items This requires the addition of more `use` items, which often make the code more verbose. But they also make the code easier to read, because `#[macro_use]` obscures where macros are defined. r? `@fee1-dead`
2024-04-29Remove `extern crate rustc_middle` from numerous crates.Nicholas Nethercote-0/+1
2024-04-19remove optionality from MoveData::base_localbeepster4096-10/+5
2024-04-08Actually create ranged int types in the type system.Oli Scherer-0/+2
2024-03-23refactor check_{lang,library}_ub: use a single intrinsic, put policy into ↵Ralf Jung-1/+1
library
2024-03-22Programmatically convert some of the pat ctorsMichael Goulet-1/+1
2024-03-08Distinguish between library and lang UB in assert_unsafe_preconditionBen Kimock-1/+1
2024-02-24Implement asm goto in MIR and MIR loweringGary Guo-1/+2
2024-02-24Change InlineAsm to allow multiple targets insteadGary Guo-1/+1
2024-02-13Rollup merge of #120802 - oli-obk:drop_elab_ice, r=compiler-errorsMatthias Krüger-1/+4
Bail out of drop elaboration when encountering error types fixes #120788
2024-02-08Bail out of drop elaboration when encountering error typesOli Scherer-1/+4
2024-02-08Add a new debug_assertions instrinsic (compiler)Ben Kimock-1/+4
And in clippy
2024-02-06Add CoroutineClosure to TyKind, AggregateKind, UpvarArgsMichael Goulet-2/+6
2024-01-15compiler: Lower fn call arg spans down to MIRMartin Nordholts-1/+1
To enable improved accuracy of diagnostics in upcoming commits.
2023-12-28Remove movability from TyKind::CoroutineMichael Goulet-2/+2
2023-11-22Replace `no_ord_impl` with `orderable`.Nicholas Nethercote-0/+2
Similar to the previous commit, this replaces `newtype_index`'s opt-out `no_ord_impl` attribute with the opt-in `orderable` attribute.
2023-10-21Use terse form for Fn bound.Camille GILLOT-16/+4
2023-10-21Parametrize gather_moves by filter.Camille GILLOT-59/+83
2023-10-21Stop computing error info in move path builder.Camille GILLOT-82/+26
2023-10-21Avoid using a magic value for untracked locals.Camille GILLOT-22/+25
2023-10-21Do not report errors from move path builder.Camille GILLOT-16/+7
2023-10-20s/Generator/Coroutine/Oli Scherer-5/+5
2023-10-02have better explanation for `relate_types`ouz-a-4/+3