From 34530a54d18ca8aaddfbfac2fb5651572821cee0 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Thu, 27 Aug 2026 11:15:16 +0200 Subject: [PATCH] test(core-remote): `assert_not_impl_any!(Global: Send, Sync)` --- Cargo.lock | 1 + wgpu-core-remote/Cargo.toml | 1 + wgpu-core-remote/src/global/mod.rs | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 32f7f9f83..ed51a6e44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4931,6 +4931,7 @@ version = "30.0.0" dependencies = [ "raw-window-handle", "serde", + "static_assertions", "wgpu-core", "wgpu-core-remote-types", "wgpu-hal", diff --git a/wgpu-core-remote/Cargo.toml b/wgpu-core-remote/Cargo.toml index a33db36f6..fbee5cc23 100644 --- a/wgpu-core-remote/Cargo.toml +++ b/wgpu-core-remote/Cargo.toml @@ -31,6 +31,7 @@ serde = ["dep:serde", "wgpu-types/serde", "wgpu-core/serde"] [dependencies] raw-window-handle.workspace = true serde = { workspace = true, optional = true } +static_assertions = { workspace = true } wgpu-core = { workspace = true, default-features = false } wgpu-core-remote-types.workspace = true wgpu-hal = { workspace = true, default-features = false } diff --git a/wgpu-core-remote/src/global/mod.rs b/wgpu-core-remote/src/global/mod.rs index 6e515e617..2377dd965 100644 --- a/wgpu-core-remote/src/global/mod.rs +++ b/wgpu-core-remote/src/global/mod.rs @@ -392,3 +392,7 @@ impl fmt::Debug for Global { f.debug_struct("Global").finish() } } + +// Force the Rust compiler to compute `Send + Sync` for `Global`, which can avoid `recursion_limit` +// issues in the resolver. +static_assertions::assert_not_impl_any!(Global: Send, Sync);