Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 691fbef

Browse files
authored
Unrolled build for rust-lang#125483
Rollup merge of rust-lang#125483 - workingjubilee:move-transform-validate-to-mir-transform, r=oli-obk compiler: validate.rs belongs next to what it validates It's hard to find code that is deeply nested and far away from its callsites, so let's move `rustc_const_eval::transform::validate` into `rustc_mir_transform`, where all of its callers are. As `rustc_mir_transform` already depends on `rustc_const_eval`, the added visible dependency edge doesn't mean the dependency tree got any worse. This also lets us unnest the `check_consts` module. I did look into moving everything inside `rustc_const_eval::transform` into `rustc_mir_transform`. It turned out to be a much more complex operation, with more concerns and real edges into the `const_eval` crate, whereas this was both faster and more obvious.
2 parents 697ac29 + 14fc3fd commit 691fbef

File tree

16 files changed

+9
-9
lines changed

16 files changed

+9
-9
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4252,6 +4252,7 @@ dependencies = [
42524252
"rustc_fluent_macro",
42534253
"rustc_hir",
42544254
"rustc_index",
4255+
"rustc_infer",
42554256
"rustc_macros",
42564257
"rustc_middle",
42574258
"rustc_mir_build",

compiler/rustc_const_eval/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#![feature(yeet_expr)]
1515
#![feature(if_let_guard)]
1616

17+
pub mod check_consts;
1718
pub mod const_eval;
1819
mod errors;
1920
pub mod interpret;
20-
pub mod transform;
2121
pub mod util;
2222

2323
use std::sync::atomic::AtomicBool;

compiler/rustc_const_eval/src/transform/mod.rs

Lines changed: 0 additions & 2 deletions
This file was deleted.

compiler/rustc_mir_transform/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ rustc_errors = { path = "../rustc_errors" }
1616
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
1717
rustc_hir = { path = "../rustc_hir" }
1818
rustc_index = { path = "../rustc_index" }
19+
rustc_infer = { path = "../rustc_infer" }
1920
rustc_macros = { path = "../rustc_macros" }
2021
rustc_middle = { path = "../rustc_middle" }
2122
rustc_mir_build = { path = "../rustc_mir_build" }

0 commit comments

Comments
 (0)