From b67be5d82980208d3307eb92075c2623b2566ae6 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sun, 14 Sep 2025 18:31:53 +0200 Subject: [PATCH] rusticl/util: make ThreadSafeCPtr Copy, Clone and transparent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Seán de Búrca Part-of: --- src/gallium/frontends/rusticl/util/ptr.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/rusticl/util/ptr.rs b/src/gallium/frontends/rusticl/util/ptr.rs index 6f278c1cd11..1c87b0172bc 100644 --- a/src/gallium/frontends/rusticl/util/ptr.rs +++ b/src/gallium/frontends/rusticl/util/ptr.rs @@ -14,7 +14,8 @@ use std::{ }; /// A wrapper around pointers to C data type which are considered thread safe. -#[derive(Eq)] +#[derive(Copy, Clone, Eq)] +#[repr(transparent)] pub struct ThreadSafeCPtr(NonNull); impl ThreadSafeCPtr {