Module: Mesa
Branch: main
Commit: b10e750199299c3d1e7c5508261926145d2c5ac6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b10e750199299c3d1e7c5508261926145d2c5ac6

Author: LingMan <[email protected]>
Date:   Sat Oct 14 03:08:29 2023 +0200

rusticl: mark the fields of callback structs private

These details are supposed to be inaccessbile and were only made pub during the 
initial
implementation phase.

Add an `#[allow(dead_code)]` marker since the CreateContextCB isn't hooked up 
yet which would cause
a warning about unused fields otherwise.

Reviewed-by: Karol Herbst <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25669>

---

 src/gallium/frontends/rusticl/api/types.rs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/frontends/rusticl/api/types.rs 
b/src/gallium/frontends/rusticl/api/types.rs
index ec1c7ed01f6..cd681f324c1 100644
--- a/src/gallium/frontends/rusticl/api/types.rs
+++ b/src/gallium/frontends/rusticl/api/types.rs
@@ -24,9 +24,10 @@ macro_rules! cl_callback {
 
         // INVARIANT:
         // All safety requirements on `func` and `data` documented on 
`$cb::new` are invariants.
+        #[allow(dead_code)]
         pub struct $cb {
-            pub func: $fn_alias,
-            pub data: *mut c_void,
+            func: $fn_alias,
+            data: *mut c_void,
         }
 
         #[allow(dead_code)]

Reply via email to