rust/compiler
Nicholas Nethercote 5d1551b9c6 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.
2025-02-19 10:26:05 +11:00
..
rustc
rustc_abi 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
rustc_arena Add inherent versions of MaybeUninit methods for slices 2025-01-11 23:57:00 -05:00
rustc_ast Add a TyPat in the AST to reuse the generic arg lowering logic 2025-02-11 08:51:05 +00:00
rustc_ast_ir
rustc_ast_lowering Move some Map methods onto TyCtxt. 2025-02-17 13:21:02 +11:00
rustc_ast_passes compiler: remove rustc_target reexport of rustc_abi::HashStableContext 2025-02-11 18:55:48 -08:00
rustc_ast_pretty Add a TyPat in the AST to reuse the generic arg lowering logic 2025-02-11 08:51:05 +00:00
rustc_attr_data_structures rustc_allowed_through_unstable_modules: require deprecation message 2025-02-02 12:36:12 +01:00
rustc_attr_parsing Rustfmt 2025-02-08 22:12:13 +00:00
rustc_baked_icu_data
rustc_borrowck Remove rustc_middle::mir::tcx module. 2025-02-19 10:26:05 +11:00
rustc_builtin_macros Rollup merge of #136646 - oli-obk:pattern-types-ast, r=BoxyUwU 2025-02-12 06:07:37 +01:00
rustc_codegen_cranelift Move some Map methods onto TyCtxt. 2025-02-17 13:21:02 +11:00
rustc_codegen_gcc Auto merge of #136575 - scottmcm:nsuw-math, r=nikic 2025-02-14 14:21:29 +00:00
rustc_codegen_llvm Rollup merge of #137095 - saethlin:use-hash64-for-hashes, r=workingjubilee 2025-02-17 06:38:14 +01:00
rustc_codegen_ssa Remove rustc_middle::mir::tcx module. 2025-02-19 10:26:05 +11:00
rustc_const_eval add a doc comment 2025-02-15 08:21:27 +01:00
rustc_data_structures 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
rustc_driver
rustc_driver_impl Remove TyCtxt::hir_krate. 2025-02-17 13:24:40 +11:00
rustc_error_codes fix the error code document 2025-02-10 04:36:49 +08:00
rustc_error_messages tree-wide: parallel: Fully removed all Lrc, replaced with Arc 2025-02-03 13:25:57 +03:00
rustc_errors 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
rustc_expand Reject macro calls inside of #![crate_name] 2025-02-15 16:47:30 +01:00
rustc_feature Rename pattern_complexity attr as pattern_complexity_limit. 2025-02-17 09:30:40 +11:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz Rustfmt 2025-02-08 22:12:13 +00:00
rustc_hashes 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
rustc_hir Auto merge of #137164 - matthiaskrgr:rollup-dj5826k, r=matthiaskrgr 2025-02-17 11:18:33 +00:00
rustc_hir_analysis Auto merge of #137164 - matthiaskrgr:rollup-dj5826k, r=matthiaskrgr 2025-02-17 11:18:33 +00:00
rustc_hir_pretty Overhaul the intravisit::Map trait. 2025-02-17 13:21:35 +11:00
rustc_hir_typeck Overhaul the intravisit::Map trait. 2025-02-17 13:21:35 +11:00
rustc_incremental Overhaul the intravisit::Map trait. 2025-02-17 13:21:35 +11:00
rustc_index Rustfmt 2025-02-08 22:12:13 +00:00
rustc_index_macros update rustc_index_macros feature handling 2024-12-19 20:32:12 +03:00
rustc_infer Rustfmt 2025-02-08 22:12:13 +00:00
rustc_interface Rollup merge of #136671 - nnethercote:middle-limits, r=Nadrieril 2025-02-17 06:37:35 +01:00
rustc_lexer Rustfmt 2025-02-08 22:12:13 +00:00
rustc_lint Rollup merge of #137101 - GrigorenkoPV:str-inherent-lint, r=Urgau 2025-02-17 06:37:38 +01:00
rustc_lint_defs Implement lint for definition site item shadowing too 2025-02-13 05:45:53 +00:00
rustc_llvm Quote embedded codeview command line arguments 2025-02-14 11:02:28 +01:00
rustc_log Avoid naming variables str 2025-01-07 14:30:02 +02:00
rustc_macros Rustfmt 2025-02-08 22:12:13 +00:00
rustc_metadata Overhaul the intravisit::Map trait. 2025-02-17 13:21:35 +11:00
rustc_middle Remove rustc_middle::mir::tcx module. 2025-02-19 10:26:05 +11:00
rustc_mir_build Remove rustc_middle::mir::tcx module. 2025-02-19 10:26:05 +11:00
rustc_mir_dataflow Remove rustc_middle::mir::tcx module. 2025-02-19 10:26:05 +11:00
rustc_mir_transform Remove rustc_middle::mir::tcx module. 2025-02-19 10:26:05 +11:00
rustc_monomorphize Move some Map methods onto TyCtxt. 2025-02-17 13:21:02 +11:00
rustc_next_trait_solver adjust derive_error 2025-02-13 23:49:09 +01:00
rustc_parse Fix const items not being allowed to be called r#move or r#static 2025-02-16 18:21:40 +01:00
rustc_parse_format Rustfmt 2025-02-08 22:12:13 +00:00
rustc_passes Overhaul the intravisit::Map trait. 2025-02-17 13:21:35 +11:00
rustc_pattern_analysis Add pattern_complexity_limit to Limits. 2025-02-17 09:30:33 +11:00
rustc_privacy Move some Map methods onto TyCtxt. 2025-02-17 13:21:02 +11:00
rustc_query_impl 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
rustc_query_system 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
rustc_resolve rustdoc: improve refdef handling in the unresolved link lint 2025-02-15 12:21:35 -07:00
rustc_sanitizers check the types in ty::Value to value conversion 2025-01-30 18:13:16 +01:00
rustc_serialize 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
rustc_session Auto merge of #137164 - matthiaskrgr:rollup-dj5826k, r=matthiaskrgr 2025-02-17 11:18:33 +00:00
rustc_smir Auto merge of #136593 - lukas-code:ty-value-perf, r=oli-obk 2025-02-13 15:27:30 +00:00
rustc_span Auto merge of #137164 - matthiaskrgr:rollup-dj5826k, r=matthiaskrgr 2025-02-17 11:18:33 +00:00
rustc_symbol_mangling 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
rustc_target Rollup merge of #137149 - Noratrieb:wtf-is-this-target, r=RalfJung 2025-02-17 06:38:17 +01:00
rustc_trait_selection Overhaul the intravisit::Map trait. 2025-02-17 13:21:35 +11:00
rustc_traits Auto merge of #136011 - compiler-errors:query-norm-vaniquishes-us, r=jackh726 2025-01-29 02:12:12 +00:00
rustc_transmute transmutability: fix ICE when passing wrong ADT to ASSUME 2025-02-08 05:44:29 +01:00
rustc_ty_utils Auto merge of #137164 - matthiaskrgr:rollup-dj5826k, r=matthiaskrgr 2025-02-17 11:18:33 +00:00
rustc_type_ir 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
rustc_type_ir_macros Rustfmt 2025-02-08 22:12:13 +00:00
stable_mir Extend the renaming to coerce_unsafe_ptr 2025-02-10 13:01:55 +00:00