@@ -140,7 +140,7 @@ impl WaitQueue {
140
140
/// until a wakeup event.
141
141
///
142
142
/// This function does not return until this thread has been awoken.
143
- pub fn wait < T > ( mut guard : SpinMutexGuard < WaitVariable < T > > ) {
143
+ pub fn wait < T > ( mut guard : SpinMutexGuard < ' _ , WaitVariable < T > > ) {
144
144
unsafe {
145
145
let mut entry = UnsafeListEntry :: new ( SpinMutex :: new ( WaitEntry {
146
146
tcs : thread:: current ( ) ,
@@ -162,8 +162,8 @@ impl WaitQueue {
162
162
///
163
163
/// If a waiter is found, a `WaitGuard` is returned which will notify the
164
164
/// waiter when it is dropped.
165
- pub fn notify_one < T > ( mut guard : SpinMutexGuard < WaitVariable < T > > )
166
- -> Result < WaitGuard < T > , SpinMutexGuard < WaitVariable < T > > >
165
+ pub fn notify_one < T > ( mut guard : SpinMutexGuard < ' _ , WaitVariable < T > > )
166
+ -> Result < WaitGuard < ' _ , T > , SpinMutexGuard < ' _ , WaitVariable < T > > >
167
167
{
168
168
unsafe {
169
169
if let Some ( entry) = guard. queue . inner . pop ( ) {
@@ -186,8 +186,8 @@ impl WaitQueue {
186
186
///
187
187
/// If at least one waiter is found, a `WaitGuard` is returned which will
188
188
/// notify all waiters when it is dropped.
189
- pub fn notify_all < T > ( mut guard : SpinMutexGuard < WaitVariable < T > > )
190
- -> Result < WaitGuard < T > , SpinMutexGuard < WaitVariable < T > > >
189
+ pub fn notify_all < T > ( mut guard : SpinMutexGuard < ' _ , WaitVariable < T > > )
190
+ -> Result < WaitGuard < ' _ , T > , SpinMutexGuard < ' _ , WaitVariable < T > > >
191
191
{
192
192
unsafe {
193
193
let mut count = 0 ;
@@ -433,7 +433,7 @@ mod spin_mutex {
433
433
}
434
434
435
435
#[ inline( always) ]
436
- pub fn lock ( & self ) -> SpinMutexGuard < T > {
436
+ pub fn lock ( & self ) -> SpinMutexGuard < ' _ , T > {
437
437
loop {
438
438
match self . try_lock ( ) {
439
439
None => while self . lock . load ( Ordering :: Relaxed ) {
@@ -445,7 +445,7 @@ mod spin_mutex {
445
445
}
446
446
447
447
#[ inline( always) ]
448
- pub fn try_lock ( & self ) -> Option < SpinMutexGuard < T > > {
448
+ pub fn try_lock ( & self ) -> Option < SpinMutexGuard < ' _ , T > > {
449
449
if !self . lock . compare_and_swap ( false , true , Ordering :: Acquire ) {
450
450
Some ( SpinMutexGuard {
451
451
mutex : self ,
0 commit comments