]> git.lizzy.rs Git - rust.git/commitdiff
Use const thread_local!
authorbjorn3 <bjorn3@users.noreply.github.com>
Tue, 7 Dec 2021 17:25:27 +0000 (18:25 +0100)
committerbjorn3 <bjorn3@users.noreply.github.com>
Tue, 7 Dec 2021 17:25:27 +0000 (18:25 +0100)
src/driver/jit.rs

index 8c93a15134909db456167acffac7002af4cce97b..309d27090b5cb0dc728386b227f7533438f0ed2a 100644 (file)
@@ -24,7 +24,7 @@ struct JitState {
 }
 
 thread_local! {
-    static LAZY_JIT_STATE: RefCell<Option<JitState>> = RefCell::new(None);
+    static LAZY_JIT_STATE: RefCell<Option<JitState>> = const { RefCell::new(None) };
 }
 
 /// The Sender owned by the rustc thread