Silence "elided lifetime has a name" warnings in no-std locking
What changed, and why it matters
This is a minor Rust code cleanup change. It adds explicit lifetime labels to two function return types in the no-std synchronization code to silence compiler warnings. There is no functional change, no security fix, and no behavior change.
No security action needed. This is a warning-silencing cleanup commit with no runtime effect.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies lightning/src/sync/nostd_sync.rs to change return types from MutexGuard
Changed components
lightning/src/sync/nostd_sync.rsInspect captured patch +2 / −2
diff --git a/lightning/src/sync/nostd_sync.rs b/lightning/src/sync/nostd_sync.rs
index 1207074..18055d1 100644
--- a/lightning/src/sync/nostd_sync.rs
+++ b/lightning/src/sync/nostd_sync.rs
@@ -61,7 +61,7 @@ impl<'a, T: 'a> LockTestExt<'a> for Mutex<T> {
}
type ExclLock = MutexGuard<'a, T>;
#[inline]
- fn unsafe_well_ordered_double_lock_self(&'a self) -> MutexGuard<T> {
+ fn unsafe_well_ordered_double_lock_self(&'a self) -> MutexGuard<'a, T> {
self.lock().unwrap()
}
}
@@ -132,7 +132,7 @@ impl<'a, T: 'a> LockTestExt<'a> for RwLock<T> {
}
type ExclLock = RwLockWriteGuard<'a, T>;
#[inline]
- fn unsafe_well_ordered_double_lock_self(&'a self) -> RwLockWriteGuard<T> {
+ fn unsafe_well_ordered_double_lock_self(&'a self) -> RwLockWriteGuard<'a, T> {
self.write().unwrap()
}
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.