rust/compiler/rustc_mir_dataflow/src
Matthias Krüger 34535b6078
Rollup merge of #137213 - nnethercote:rm-rustc_middle-mir-tcx, r=compiler-errors
Remove `rustc_middle::mir::tcx` module.

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.

r? `@tmandry`
2025-02-19 01:30:13 +01:00
..
framework Remove SwitchIntTarget. 2025-02-17 09:51:37 +11:00
impls Remove SwitchIntTarget. 2025-02-17 09:51:37 +11:00
move_paths Remove rustc_middle::mir::tcx module. 2025-02-19 10:26:05 +11:00
debuginfo.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
drop_flag_effects.rs Move drop elaboration infrastructure. 2025-02-14 16:05:34 +11:00
errors.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
lib.rs Move drop elaboration infrastructure. 2025-02-14 16:05:34 +11:00
points.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
rustc_peek.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
un_derefer.rs Avoid unnecessary exports. 2023-11-23 14:06:57 +11:00
value_analysis.rs Remove rustc_middle::mir::tcx module. 2025-02-19 10:26:05 +11:00