Skip to content

Commit

Permalink
auto merge of #17949 : ebfe/rust/cfg_warn, r=sfackler
Browse files Browse the repository at this point in the history
This converts old style cfgs that generate warnings during `make check` to the new syntax.
  • Loading branch information
bors committed Oct 12, 2014
2 parents adb44f5 + 151aaaf commit 86509d8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
16 changes: 8 additions & 8 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
}
Expand Down Expand Up @@ -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(" "))
}
Expand Down
16 changes: 8 additions & 8 deletions src/libcoretest/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_back/rpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 86509d8

Please sign in to comment.