@@ -140,7 +140,7 @@ impl WaitQueue {
140140 /// until a wakeup event.
141141 ///
142142 /// 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 > > ) {
144144 unsafe {
145145 let mut entry = UnsafeListEntry :: new ( SpinMutex :: new ( WaitEntry {
146146 tcs : thread:: current ( ) ,
@@ -162,8 +162,8 @@ impl WaitQueue {
162162 ///
163163 /// If a waiter is found, a `WaitGuard` is returned which will notify the
164164 /// 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 > > >
167167 {
168168 unsafe {
169169 if let Some ( entry) = guard. queue . inner . pop ( ) {
@@ -186,8 +186,8 @@ impl WaitQueue {
186186 ///
187187 /// If at least one waiter is found, a `WaitGuard` is returned which will
188188 /// 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 > > >
191191 {
192192 unsafe {
193193 let mut count = 0 ;
@@ -433,7 +433,7 @@ mod spin_mutex {
433433 }
434434
435435 #[ inline( always) ]
436- pub fn lock ( & self ) -> SpinMutexGuard < T > {
436+ pub fn lock ( & self ) -> SpinMutexGuard < ' _ , T > {
437437 loop {
438438 match self . try_lock ( ) {
439439 None => while self . lock . load ( Ordering :: Relaxed ) {
@@ -445,7 +445,7 @@ mod spin_mutex {
445445 }
446446
447447 #[ inline( always) ]
448- pub fn try_lock ( & self ) -> Option < SpinMutexGuard < T > > {
448+ pub fn try_lock ( & self ) -> Option < SpinMutexGuard < ' _ , T > > {
449449 if !self . lock . compare_and_swap ( false , true , Ordering :: Acquire ) {
450450 Some ( SpinMutexGuard {
451451 mutex : self ,
0 commit comments