-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove rustc_middle::mir::tcx
module.
#137213
Conversation
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My best guess w/o looking is that this is just an artifact from the early history of the module structure of mir::*
.
r? compiler-errors @bors r+ rollup |
(AFAICT the CI failure was network related and not due to this PR) |
…x, 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`
Rollup of 9 pull requests Successful merges: - rust-lang#137151 (Install more signal stack trace handlers) - rust-lang#137167 (tests: Also gate `f16::erfc()` doctest with `reliable_f16_math` cfg) - rust-lang#137195 (cg_clif: use exclusively ABI alignment) - rust-lang#137202 (Enforce T: Hash for Interned<...>) - rust-lang#137205 (Remove `std::os::wasi::fs::FileExt::tell`) - rust-lang#137211 (don't ICE for alias-relate goals with error term) - rust-lang#137213 (Remove `rustc_middle::mir::tcx` module.) - rust-lang#137214 (add last std diagnostic items for clippy) - rust-lang#137221 (Remove scrutinee_hir_id from ExprKind::Match) r? `@ghost` `@rustbot` modify labels: rollup
Failed in #137226 (comment)
@bors r- |
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.
527eada
to
5d1551b
Compare
This PR changes MIR |
I fixed the rustdoc link error. That triggered this notification because there is now a single doc link change in a comment in @bors r=compiler-errors |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#136936 (Use 'yes' instead of 'while-echo' in tests/ui/process/process-sigpipe.rs except 'nto') - rust-lang#137026 (Stabilize (and const-stabilize) `integer_sign_cast`) - rust-lang#137059 (fix: Alloc new errorcode E0803 for E0495) - rust-lang#137177 (Update `minifier-rs` version to `0.3.5`) - rust-lang#137210 (compiler: Stop reexporting stuff in cg_llvm::abi) - rust-lang#137213 (Remove `rustc_middle::mir::tcx` module.) - rust-lang#137216 (eval_outlives: bail out early if both regions are in the same SCC) - rust-lang#137228 (Fix typo in hidden internal docs of `TrustedRandomAccess`) - rust-lang#137242 (Add reference annotations for the `do_not_recommend` attribute) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#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`
This is a really weird module. For example, what does
tcx
inrustc_middle::mir::tcx::PlaceTy
mean? The answer is "not much".The top-level module comment says:
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 haveimpl
blocks in both thetcx
andstatement
modules. The commit merges the former into the latter.BinOp
,UnOp
: they only haveimpl
blocks intcx
. The commit moves these intostatement
.PlaceTy
,RvalueInitializationState
: they are defined intcx
. This commit moves them intostatement
and makes them available inmir::*
, like many other MIR types.r? @tmandry