diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-03-31 16:10:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-31 16:10:34 +0200 |
| commit | a02b825c9330f9abe5813d2fd5e65d361ff218ea (patch) | |
| tree | 94f78e617a1bdc74f54596183e565fe3b0b5c996 /src/libstd/sys/sgx/waitqueue.rs | |
| parent | cee58fdc12bea8cc373366bd84fc786277729b1c (diff) | |
| parent | 1d9508a33a3ff16355ad76c356c572cb67b4784f (diff) | |
| download | rust-a02b825c9330f9abe5813d2fd5e65d361ff218ea.tar.gz rust-a02b825c9330f9abe5813d2fd5e65d361ff218ea.zip | |
Rollup merge of #58828 - Centril:deny-elided_lifetimes_in_paths-libstd, r=oli-obk
libstd: deny(elided_lifetimes_in_paths) r? @oli-obk
Diffstat (limited to 'src/libstd/sys/sgx/waitqueue.rs')
| -rw-r--r-- | src/libstd/sys/sgx/waitqueue.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/sys/sgx/waitqueue.rs b/src/libstd/sys/sgx/waitqueue.rs index 3f5e03ddad6..f4adb7d1e16 100644 --- a/src/libstd/sys/sgx/waitqueue.rs +++ b/src/libstd/sys/sgx/waitqueue.rs @@ -140,7 +140,7 @@ impl WaitQueue { /// until a wakeup event. /// /// This function does not return until this thread has been awoken. - pub fn wait<T>(mut guard: SpinMutexGuard<WaitVariable<T>>) { + pub fn wait<T>(mut guard: SpinMutexGuard<'_, WaitVariable<T>>) { unsafe { let mut entry = UnsafeListEntry::new(SpinMutex::new(WaitEntry { tcs: thread::current(), @@ -162,8 +162,8 @@ impl WaitQueue { /// /// If a waiter is found, a `WaitGuard` is returned which will notify the /// waiter when it is dropped. - pub fn notify_one<T>(mut guard: SpinMutexGuard<WaitVariable<T>>) - -> Result<WaitGuard<T>, SpinMutexGuard<WaitVariable<T>>> + pub fn notify_one<T>(mut guard: SpinMutexGuard<'_, WaitVariable<T>>) + -> Result<WaitGuard<'_, T>, SpinMutexGuard<'_, WaitVariable<T>>> { unsafe { if let Some(entry) = guard.queue.inner.pop() { @@ -186,8 +186,8 @@ impl WaitQueue { /// /// If at least one waiter is found, a `WaitGuard` is returned which will /// notify all waiters when it is dropped. - pub fn notify_all<T>(mut guard: SpinMutexGuard<WaitVariable<T>>) - -> Result<WaitGuard<T>, SpinMutexGuard<WaitVariable<T>>> + pub fn notify_all<T>(mut guard: SpinMutexGuard<'_, WaitVariable<T>>) + -> Result<WaitGuard<'_, T>, SpinMutexGuard<'_, WaitVariable<T>>> { unsafe { let mut count = 0; @@ -433,7 +433,7 @@ mod spin_mutex { } #[inline(always)] - pub fn lock(&self) -> SpinMutexGuard<T> { + pub fn lock(&self) -> SpinMutexGuard<'_, T> { loop { match self.try_lock() { None => while self.lock.load(Ordering::Relaxed) { @@ -445,7 +445,7 @@ mod spin_mutex { } #[inline(always)] - pub fn try_lock(&self) -> Option<SpinMutexGuard<T>> { + pub fn try_lock(&self) -> Option<SpinMutexGuard<'_, T>> { if !self.lock.compare_and_swap(false, true, Ordering::Acquire) { Some(SpinMutexGuard { mutex: self, |
