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/num | |
| 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/num')
| -rw-r--r-- | src/libstd/num/f32.rs | 5 | ||||
| -rw-r--r-- | src/libstd/num/f64.rs | 4 | ||||
| -rw-r--r-- | src/libstd/num/mod.rs | 5 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 30bee80fbf6..1cd258a5a72 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -15,11 +15,16 @@ #![stable(feature = "rust1", since = "1.0.0")] #![allow(missing_docs)] +#[cfg(not(test))] use core::num; +#[cfg(not(test))] use intrinsics; +#[cfg(not(test))] use libc::c_int; +#[cfg(not(test))] use num::FpCategory; + #[stable(feature = "rust1", since = "1.0.0")] pub use core::f32::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON}; #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index d444b259445..b6a85ee0e9f 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -15,9 +15,13 @@ #![stable(feature = "rust1", since = "1.0.0")] #![allow(missing_docs)] +#[cfg(not(test))] use core::num; +#[cfg(not(test))] use intrinsics; +#[cfg(not(test))] use libc::c_int; +#[cfg(not(test))] use num::FpCategory; #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs index 8e207f5e6cf..faaff494cab 100644 --- a/src/libstd/num/mod.rs +++ b/src/libstd/num/mod.rs @@ -47,11 +47,6 @@ pub fn test_num<T>(ten: T, two: T) where #[cfg(test)] mod tests { use super::*; - use i8; - use i16; - use i32; - use i64; - use isize; use u8; use u16; use u32; |
