mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
12b1f3f145
Use a hook to decouple `rustc_mir_transform` from `rustc_mir_build` I noticed that the only point of direct contact between the `rustc_mir_transform` and `rustc_mir_build` crates is a single `build_mir` function, which could easily be changed to a hook function instead. By making that function a hook, we can make `rustc_mir_transform` no longer have a dependency on `rustc_mir_build`, allowing them to be built/rebuilt independently. That should hopefully allow slightly more parallelism in clean builds and incremental rebuilds of the compiler.
For more information about how rustc works, see the rustc dev guide.