From 0e6b24451df5c05aa5a4ed945ea6fdbecde8d733 Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Thu, 28 Aug 2025 16:20:34 +0200
Subject: [PATCH] rusticl: Fix hidden lifetime warnings
Fix the following warning, and others that are similar, as rustc
suggests:
warning: hiding a lifetime that's elided elsewhere is confusing
--> ../src/gallium/frontends/rusticl/mesa/compiler/nir.rs:282:22
|
282 | pub fn variables(&mut self) -> ExecListIter {
| ^^^^^^^^^ -------------------------- the same lifetime is hidden here
| |
| the lifetime is elided here
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
282 | pub fn variables(&mut self) -> ExecListIter<'_, nir_variable> {
| +++
Signed-off-by: Philipp Zabel
Part-of:
---
src/gallium/frontends/rusticl/core/device.rs | 14 +++++++-------
src/gallium/frontends/rusticl/core/event.rs | 2 +-
src/gallium/frontends/rusticl/core/kernel.rs | 2 +-
src/gallium/frontends/rusticl/core/program.rs | 2 +-
src/gallium/frontends/rusticl/core/queue.rs | 2 +-
src/gallium/frontends/rusticl/mesa/compiler/nir.rs | 2 +-
src/gallium/frontends/rusticl/mesa/pipe/context.rs | 10 +++++-----
src/gallium/frontends/rusticl/mesa/pipe/query.rs | 2 +-
src/gallium/frontends/rusticl/mesa/pipe/screen.rs | 2 +-
.../frontends/rusticl/mesa/util/disk_cache.rs | 2 +-
10 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src/gallium/frontends/rusticl/core/device.rs b/src/gallium/frontends/rusticl/core/device.rs
index a21135748e3..3c85315d9bc 100644
--- a/src/gallium/frontends/rusticl/core/device.rs
+++ b/src/gallium/frontends/rusticl/core/device.rs
@@ -132,7 +132,7 @@ pub trait HelperContextWrapper {
offset: i32,
size: i32,
rw: RWFlags,
- ) -> Option;
+ ) -> Option>;
fn create_compute_state(&self, nir: &NirShader, static_local_mem: u32) -> *mut c_void;
fn delete_compute_state(&self, cso: *mut c_void);
fn compute_state_info(&self, state: *mut c_void) -> pipe_compute_state_object_info;
@@ -144,14 +144,14 @@ pub trait HelperContextWrapper {
offset: i32,
size: i32,
rw: RWFlags,
- ) -> Option;
+ ) -> Option>;
fn map_texture_unsynchronized(
&self,
res: &PipeResource,
bx: &pipe_box,
rw: RWFlags,
- ) -> Option;
+ ) -> Option>;
fn is_create_fence_fd_supported(&self) -> bool;
fn import_fence(&self, fence_fd: &FenceFd, fence_type: pipe_fd_type) -> CLResult;
@@ -200,7 +200,7 @@ impl HelperContextWrapper for HelperContext<'_> {
offset: i32,
size: i32,
rw: RWFlags,
- ) -> Option {
+ ) -> Option> {
self.lock.buffer_map(res, offset, size, rw)
}
@@ -226,7 +226,7 @@ impl HelperContextWrapper for HelperContext<'_> {
offset: i32,
size: i32,
rw: RWFlags,
- ) -> Option {
+ ) -> Option> {
self.lock.buffer_map_flags(
res,
offset,
@@ -240,7 +240,7 @@ impl HelperContextWrapper for HelperContext<'_> {
res: &PipeResource,
bx: &pipe_box,
rw: RWFlags,
- ) -> Option {
+ ) -> Option> {
self.lock
.texture_map_flags(res, bx, pipe_map_flags::PIPE_MAP_UNSYNCHRONIZED | rw.into())
}
@@ -1122,7 +1122,7 @@ impl DeviceBase {
})
}
- fn reusable_ctx(&self) -> MutexGuard> {
+ fn reusable_ctx(&self) -> MutexGuard<'_, Vec> {
self.reusable_ctx.lock().unwrap()
}
diff --git a/src/gallium/frontends/rusticl/core/event.rs b/src/gallium/frontends/rusticl/core/event.rs
index 1c36c09f16a..ebc85c5e6a3 100644
--- a/src/gallium/frontends/rusticl/core/event.rs
+++ b/src/gallium/frontends/rusticl/core/event.rs
@@ -97,7 +97,7 @@ impl Event {
})
}
- fn state(&self) -> MutexGuard {
+ fn state(&self) -> MutexGuard<'_, EventMutState> {
self.state.lock().unwrap()
}
diff --git a/src/gallium/frontends/rusticl/core/kernel.rs b/src/gallium/frontends/rusticl/core/kernel.rs
index e25e6904e8c..8ebd6f928e3 100644
--- a/src/gallium/frontends/rusticl/core/kernel.rs
+++ b/src/gallium/frontends/rusticl/core/kernel.rs
@@ -1721,7 +1721,7 @@ impl Kernel {
}))
}
- pub fn arg_values(&self) -> MutexGuard>> {
+ pub fn arg_values(&self) -> MutexGuard<'_, Vec