rustc: Move crate_types from Session to GlobalCtxt

Removes a piece of mutable state.
Follow up to #114578.
This commit is contained in:
Vadim Petrochenkov 2023-08-08 18:28:20 +08:00
parent 5dd98a4eb1
commit b107241218

View File

@ -98,7 +98,7 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! {
tcx.sess.fatal("JIT mode doesn't work with `cargo check`");
}
if !tcx.sess.crate_types().contains(&rustc_session::config::CrateType::Executable) {
if !tcx.crate_types().contains(&rustc_session::config::CrateType::Executable) {
tcx.sess.fatal("can't jit non-executable crate");
}