rusticl: fix mismatched-lifetime-syntaxes lint warning

This warn-by-default lint introduced in Rust 1.89.0 causes the following
warning:

warning: hiding a lifetime that's elided elsewhere is confusing
   --> ../../src/gallium/frontends/rusticl/core/semaphore.rs:276:14
    |
276 |     fn state(&self) -> MutexGuard<SemaphoreState> {
    |              ^^^^^     -------------------------- 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
    |
276 |     fn state(&self) -> MutexGuard<'_, SemaphoreState> {
    |                                   +++

Follow the compiler's suggestion to fix this.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38132>
This commit is contained in:
Job Noorman 2025-10-29 10:40:50 +01:00 committed by Marge Bot
parent 39e2db5dfc
commit e16be20195

View file

@ -273,7 +273,7 @@ impl Semaphore {
Ok(())
}
fn state(&self) -> MutexGuard<SemaphoreState> {
fn state(&self) -> MutexGuard<'_, SemaphoreState> {
self.state.lock().unwrap()
}
}