diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs index 349ae15eb32..0d2872bcba0 100644 --- a/src/liballoc/heap.rs +++ b/src/liballoc/heap.rs @@ -111,12 +111,12 @@ unsafe fn exchange_free(ptr: *mut u8, size: uint, align: uint) { // The minimum alignment guaranteed by the architecture. This value is used to // add fast paths for low alignment values. In practice, the alignment is a // constant at the call site and the branch will be optimized out. -#[cfg(target_arch = "arm")] -#[cfg(target_arch = "mips")] -#[cfg(target_arch = "mipsel")] +#[cfg(any(target_arch = "arm", + target_arch = "mips", + target_arch = "mipsel"))] static MIN_ALIGN: uint = 8; -#[cfg(target_arch = "x86")] -#[cfg(target_arch = "x86_64")] +#[cfg(any(target_arch = "x86", + target_arch = "x86_64"))] static MIN_ALIGN: uint = 16; #[cfg(jemalloc)] @@ -146,7 +146,7 @@ mod imp { } // -lpthread needs to occur after -ljemalloc, the earlier argument isn't enough - #[cfg(not(windows), not(target_os = "android"))] + #[cfg(all(not(windows), not(target_os = "android")))] #[link(name = "pthread")] extern {} @@ -206,7 +206,7 @@ mod imp { } } -#[cfg(not(jemalloc), unix)] +#[cfg(all(not(jemalloc), unix))] mod imp { use core::cmp; use core::ptr; @@ -268,7 +268,7 @@ mod imp { pub fn stats_print() {} } -#[cfg(not(jemalloc), windows)] +#[cfg(all(not(jemalloc), windows))] mod imp { use libc::{c_void, size_t}; use libc;