1
Fork 0
rust/compiler/rustc_borrowck/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
..
constraints Reduce visibilities. 2024-11-04 15:43:45 +11:00
diagnostics Rollup merge of #137213 - nnethercote:rm-rustc_middle-mir-tcx, r=compiler-errors 2025-02-19 01:30:13 +01:00
polonius Rollup merge of #136299 - lqd:polonius-next-episode-9, r=jackh726 2025-02-03 21:11:34 +01:00
region_infer Rework name_regions to not rely on reverse scc graph for non-member-constrain usages 2025-02-15 21:49:53 +00:00
type_check Remove rustc_middle::mir::tcx module. 2025-02-19 10:26:05 +11:00
borrow_set.rs rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
borrowck_errors.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
consumers.rs rename AllFacts to PoloniusFacts 2025-01-08 13:23:54 +00:00
dataflow.rs move out of scope precomputer code 2025-01-12 07:39:20 +00:00
def_use.rs Rollup merge of #126013 - nnethercote:unreachable_pub, r=Urgau 2024-08-27 00:41:57 +02:00
lib.rs Rollup merge of #137213 - nnethercote:rm-rustc_middle-mir-tcx, r=compiler-errors 2025-02-19 01:30:13 +01:00
member_constraints.rs remove non-borrowck member constraints 2024-12-20 10:04:01 +01:00
nll.rs record boring locals in polonius context 2025-01-31 11:04:50 +00:00
path_utils.rs remove borrowck duplicate of std::ops::ControlFlow 2025-01-01 12:13:33 +00:00
place_ext.rs Remove #[macro_use] extern crate tracing from rustc_borrowck. 2024-08-30 17:14:53 +10:00
places_conflict.rs Implement MIR, CTFE, and codegen for unsafe binders 2025-01-31 17:19:53 +00:00
prefixes.rs Implement MIR, CTFE, and codegen for unsafe binders 2025-01-31 17:19:53 +00:00
renumber.rs mir borrowck: cleanup late-bound region handling 2025-01-14 14:16:12 +01:00
session_diagnostics.rs Rework "long type names" printing logic 2025-01-31 20:39:01 +00:00
universal_regions.rs Rollup merge of #135711 - estebank:issue-135649, r=davidtwco 2025-02-18 18:40:49 +01:00
used_muts.rs Remove unnecessary lifetimes in dataflow structs. 2024-09-09 16:14:18 +10:00