rust/compiler/rustc_codegen_ssa/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
..
back Rollup merge of #135909 - Flakebi:amdgpu-kd, r=jieyouxu,workingjubilee 2025-02-16 00:51:24 -05:00
debuginfo Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer 2025-02-16 16:18:30 -05:00
mir Rollup merge of #137213 - nnethercote:rm-rustc_middle-mir-tcx, r=compiler-errors 2025-02-19 01:30:13 +01:00
traits Auto merge of #133852 - x17jiri:cold_path, r=saethlin 2025-02-18 07:49:09 +00:00
assert_module_sources.rs Change collect_and_partition_mono_items tuple return type to a struct 2025-01-27 09:38:12 +00:00
base.rs Make -O mean -C opt-level=3 2025-02-13 19:47:55 +00:00
codegen_attrs.rs Rollup merge of #134090 - veluca93:stable-tf11, r=oli-obk 2025-02-12 20:09:56 -05:00
common.rs Test fixing raw-dylib 2024-09-24 10:10:31 -07:00
errors.rs Rollup merge of #133429 - EnzymeAD:autodiff-middle, r=oli-obk 2025-01-31 00:26:30 -05:00
lib.rs tree-wide: parallel: Fully removed all Lrc, replaced with Arc 2025-02-03 13:25:57 +03:00
meth.rs More assertions, tests, and miri coverage 2025-01-30 17:44:28 +00:00
mono_item.rs Move some Map methods onto TyCtxt. 2025-02-17 13:21:02 +11:00
size_of_val.rs Set both nuw and nsw in slice size calculation 2025-02-13 21:26:48 -08:00
target_features.rs add dedicated type for ABI target feature constraints 2025-01-05 10:46:30 +01:00