Skip to content

Commit 22ee6d6

Browse files
authored
Rollup merge of #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 c83874a + ba5869d commit 22ee6d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/panic/mir-validation.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
thread 'rustc' panicked at compiler/rustc_const_eval/src/transform/validate.rs:LL:CC:
1+
thread 'rustc' panicked at compiler/rustc_mir_transform/src/validate.rs:LL:CC:
22
broken MIR in Item(DefId) (after phase change to runtime-optimized) at bb0[1]:
33
(*(_2.0: *mut i32)), has deref at the wrong place
44
stack backtrace:

0 commit comments

Comments
 (0)