mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01:00
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:
parent
39e2db5dfc
commit
e16be20195
1 changed files with 1 additions and 1 deletions
|
|
@ -273,7 +273,7 @@ impl Semaphore {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn state(&self) -> MutexGuard<SemaphoreState> {
|
||||
fn state(&self) -> MutexGuard<'_, SemaphoreState> {
|
||||
self.state.lock().unwrap()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue