about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/sync
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-12 16:24:31 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2024-02-12 16:25:39 +0100
commitd0873c7a11e71a46ad58c1d152fb0599281d98df (patch)
tree58de90de657d19c50055b7a762bc7208e4b6c29e /compiler/rustc_data_structures/src/sync
parented195328689e052b5270b25d0e410b491914fc71 (diff)
downloadrust-d0873c7a11e71a46ad58c1d152fb0599281d98df.tar.gz
rust-d0873c7a11e71a46ad58c1d152fb0599281d98df.zip
constify a couple thread_local statics
Diffstat (limited to 'compiler/rustc_data_structures/src/sync')
-rw-r--r--compiler/rustc_data_structures/src/sync/worker_local.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/sync/worker_local.rs b/compiler/rustc_data_structures/src/sync/worker_local.rs
index b34d3dd9044..ba9f88b912e 100644
--- a/compiler/rustc_data_structures/src/sync/worker_local.rs
+++ b/compiler/rustc_data_structures/src/sync/worker_local.rs
@@ -42,7 +42,7 @@ pub struct Registry(Arc<RegistryData>);
 thread_local! {
     /// The registry associated with the thread.
     /// This allows the `WorkerLocal` type to clone the registry in its constructor.
-    static REGISTRY: OnceCell<Registry> = OnceCell::new();
+    static REGISTRY: OnceCell<Registry> = const { OnceCell::new() };
 }
 
 struct ThreadData {