diff options
| author | bors <bors@rust-lang.org> | 2014-10-12 02:22:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-12 02:22:14 +0000 |
| commit | 86509d8d7ab68c5e4202dea9ff1bfb79409f2f8d (patch) | |
| tree | eaf67a25dcb98022e7b42887e816b425e90160d6 /src | |
| parent | adb44f53d8cd0170930a324d514bd75fbd9a0271 (diff) | |
| parent | 151aaaf46ba7ba9c53f3e7df7a04b93cf1b8fd9f (diff) | |
| download | rust-86509d8d7ab68c5e4202dea9ff1bfb79409f2f8d.tar.gz rust-86509d8d7ab68c5e4202dea9ff1bfb79409f2f8d.zip | |
auto merge of #17949 : ebfe/rust/cfg_warn, r=sfackler
This converts old style cfgs that generate warnings during `make check` to the new syntax.
Diffstat (limited to 'src')
| -rw-r--r-- | src/compiletest/runtest.rs | 16 | ||||
| -rw-r--r-- | src/libcoretest/mem.rs | 16 | ||||
| -rw-r--r-- | src/librustc_back/rpath.rs | 3 |
3 files changed, 17 insertions, 18 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 2b52ac65e47..ab8d924a442 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -952,10 +952,10 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> , to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice()) } - #[cfg(target_os = "linux")] - #[cfg(target_os = "macos")] - #[cfg(target_os = "freebsd")] - #[cfg(target_os = "dragonfly")] + #[cfg(any(target_os = "linux", + target_os = "macos", + target_os = "freebsd", + target_os = "dragonfly"))] fn prefix_matches( line : &str, prefix : &str ) -> bool { line.starts_with( prefix ) } @@ -1356,10 +1356,10 @@ fn program_output(config: &Config, testfile: &Path, lib_path: &str, prog: String } // Linux and mac don't require adjusting the library search path -#[cfg(target_os = "linux")] -#[cfg(target_os = "macos")] -#[cfg(target_os = "freebsd")] -#[cfg(target_os = "dragonfly")] +#[cfg(any(target_os = "linux", + target_os = "macos", + target_os = "freebsd", + target_os = "dragonfly"))] fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String { format!("{} {}", prog, args.connect(" ")) } diff --git a/src/libcoretest/mem.rs b/src/libcoretest/mem.rs index fde640158f5..76409c8612f 100644 --- a/src/libcoretest/mem.rs +++ b/src/libcoretest/mem.rs @@ -19,10 +19,10 @@ fn size_of_basic() { } #[test] -#[cfg(target_arch = "x86")] -#[cfg(target_arch = "arm")] -#[cfg(target_arch = "mips")] -#[cfg(target_arch = "mipsel")] +#[cfg(any(target_arch = "x86", + target_arch = "arm", + target_arch = "mips", + target_arch = "mipsel"))] fn size_of_32() { assert_eq!(size_of::<uint>(), 4u); assert_eq!(size_of::<*const uint>(), 4u); @@ -51,10 +51,10 @@ fn align_of_basic() { } #[test] -#[cfg(target_arch = "x86")] -#[cfg(target_arch = "arm")] -#[cfg(target_arch = "mips")] -#[cfg(target_arch = "mipsel")] +#[cfg(any(target_arch = "x86", + target_arch = "arm", + target_arch = "mips", + target_arch = "mipsel"))] fn align_of_32() { assert_eq!(align_of::<uint>(), 4u); assert_eq!(align_of::<*const uint>(), 4u); diff --git a/src/librustc_back/rpath.rs b/src/librustc_back/rpath.rs index abb594d6e47..a7a234dc18a 100644 --- a/src/librustc_back/rpath.rs +++ b/src/librustc_back/rpath.rs @@ -200,8 +200,7 @@ mod test { } #[test] - #[cfg(target_os = "linux")] - #[cfg(target_os = "android")] + #[cfg(any(target_os = "linux", target_os = "android"))] fn test_rpath_relative() { let config = &mut RPathConfig { os: abi::OsLinux, |
