diff --git a/src/condvar.rs b/src/condvar.rs index 20091762..9eaf3007 100644 --- a/src/condvar.rs +++ b/src/condvar.rs @@ -380,12 +380,6 @@ impl Condvar { /// /// Like `wait`, the lock specified will be re-acquired when this function /// returns, regardless of whether the timeout elapsed or not. - /// - /// # Panics - /// - /// Panics if the given `timeout` is so large that it can't be added to the current time. - /// This panic is not possible if the crate is built with the `nightly` feature, then a too - /// large `timeout` becomes equivalent to just calling `wait`. #[inline] pub fn wait_for( &self, @@ -556,14 +550,7 @@ mod tests { let _g = m2.lock(); c2.notify_one(); }); - // Non-nightly panics on too large timeouts. Nightly treats it as indefinite wait. - let very_long_timeout = if cfg!(feature = "nightly") { - Duration::from_secs(u64::max_value()) - } else { - Duration::from_millis(u32::max_value() as u64) - }; - - let timeout_res = c.wait_for(&mut g, very_long_timeout); + let timeout_res = c.wait_for(&mut g, Duration::from_secs(u64::max_value())); assert!(!timeout_res.timed_out()); drop(g); diff --git a/src/elision.rs b/src/elision.rs index 32da6ad4..8fa229ec 100644 --- a/src/elision.rs +++ b/src/elision.rs @@ -5,7 +5,7 @@ // http://opensource.org/licenses/MIT>, at your option. This file may not be // copied, modified, or distributed except according to those terms. -#[cfg(all(feature = "nightly", any(target_arch = "x86", target_arch = "x86_64")))] +#[cfg(all(feature = "hardware-lock-elision", any(target_arch = "x86", target_arch = "x86_64")))] use std::arch::asm; use std::sync::atomic::AtomicUsize;