From d4ba942b17a7bfde7ae3726218742e6d78fa62b1 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Sat, 11 Oct 2014 16:10:43 +0200 Subject: [PATCH] Fix cfg warnings in compiletest --- src/compiletest/runtest.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 2b52ac65e478..ab8d924a4426 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -952,10 +952,10 @@ fn check_expected_errors(expected_errors: Vec , 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(" ")) }