rustc: Move crate_types
from Session
to GlobalCtxt
Removes a piece of mutable state. Follow up to #114578.
This commit is contained in:
parent
5dd98a4eb1
commit
b107241218
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user