From d0873c7a11e71a46ad58c1d152fb0599281d98df Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Mon, 12 Feb 2024 16:24:31 +0100 Subject: constify a couple thread_local statics --- compiler/rustc_data_structures/src/sync/worker_local.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_data_structures/src/sync') 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); thread_local! { /// The registry associated with the thread. /// This allows the `WorkerLocal` type to clone the registry in its constructor. - static REGISTRY: OnceCell = OnceCell::new(); + static REGISTRY: OnceCell = const { OnceCell::new() }; } struct ThreadData { -- cgit 1.4.1-3-g733a5