diff options
| author | bors <bors@rust-lang.org> | 2015-12-30 07:35:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-12-30 07:35:10 +0000 |
| commit | a06bb977d86dcfe786d4265f4807a11c39b51141 (patch) | |
| tree | 27a2b4e75bd918cbe2276a3e9a26eac34825e72f /src/libstd/sync | |
| parent | 6e2a64b57a74f35bef215972adf1b803cff288bd (diff) | |
| parent | e27cbeff370897b8450caa204c08049651a10c13 (diff) | |
| download | rust-a06bb977d86dcfe786d4265f4807a11c39b51141.tar.gz rust-a06bb977d86dcfe786d4265f4807a11c39b51141.zip | |
Auto merge of #30458 - fhahn:fix-warnings-tests-stdlib, r=sanxiyn
This PR siliences some warnings when compiling stdlib with --test. Mostly remove some unused imports and added a few `#[allow(..)]`. I also marked some signal handling functions with `#[cfg(not(test))]`, because they are only called through `rt::lang_start`, which is also marked as `#[cfg(not(test))]`
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/condvar.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs index d817a261f7c..1f7fe820bf8 100644 --- a/src/libstd/sync/condvar.rs +++ b/src/libstd/sync/condvar.rs @@ -510,15 +510,15 @@ mod tests { static M: StaticMutex = StaticMutex::new(); let g = M.lock().unwrap(); - let (g, _no_timeout) = C.wait_timeout_ms(g, 1).unwrap(); + let (g, _no_timeout) = C.wait_timeout(g, Duration::from_millis(1)).unwrap(); // spurious wakeups mean this isn't necessarily true // assert!(!no_timeout); let _t = thread::spawn(move || { let _g = M.lock().unwrap(); C.notify_one(); }); - let (g, no_timeout) = C.wait_timeout_ms(g, u32::MAX).unwrap(); - assert!(no_timeout); + let (g, timeout_res) = C.wait_timeout(g, Duration::from_millis(u32::MAX as u64)).unwrap(); + assert!(!timeout_res.timed_out()); drop(g); unsafe { C.destroy(); M.destroy(); } } |
