about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/driver/jit.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-08-08 18:28:20 +0800
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-08-09 14:17:54 +0800
commit0b89aac08d7190961544ced9e868cc20ce24d786 (patch)
tree0aa4c283516f8f45d12396e9641f196149b55c8a /compiler/rustc_codegen_cranelift/src/driver/jit.rs
parent8838c73e866aa85b40463640ff6f5af268507812 (diff)
downloadrust-0b89aac08d7190961544ced9e868cc20ce24d786.tar.gz
rust-0b89aac08d7190961544ced9e868cc20ce24d786.zip
rustc: Move `crate_types` from `Session` to `GlobalCtxt`
Removes a piece of mutable state.
Follow up to #114578.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/driver/jit.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/driver/jit.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/jit.rs b/compiler/rustc_codegen_cranelift/src/driver/jit.rs
index 3ea38842148..1c606494f38 100644
--- a/compiler/rustc_codegen_cranelift/src/driver/jit.rs
+++ b/compiler/rustc_codegen_cranelift/src/driver/jit.rs
@@ -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");
     }