diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-03-31 12:56:42 +0200 | 
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-03-31 12:56:51 +0200 | 
| commit | 351a20c32fad14760e406e76fab43c8596de694d (patch) | |
| tree | bdbd384f91e763abf4b9dd9c5dcc4ed4506a538e /src/libstd/sys/sgx/waitqueue.rs | |
| parent | c5d60910ca81736e498b307dbf7dcea26867f9b1 (diff) | |
| download | rust-351a20c32fad14760e406e76fab43c8596de694d.tar.gz rust-351a20c32fad14760e406e76fab43c8596de694d.zip | |
libstd: deny(elided_lifetimes_in_paths), fixes in sgx
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, | 
