From b1b4bc90b8a1d2fc73b76cbbd0104f6c1acee33f Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 30 Dec 2014 06:13:08 +0100 Subject: Fix warning in liballoc about unused constant MIN_ALIGN when cfg(feature = external_*) --- src/liballoc/heap.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs index 14ba5437565..439bb6c55dc 100644 --- a/src/liballoc/heap.rs +++ b/src/liballoc/heap.rs @@ -115,13 +115,17 @@ unsafe fn exchange_free(ptr: *mut u8, old_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(any(target_arch = "arm", - target_arch = "mips", - target_arch = "mipsel"))] +#[cfg(all(not(feature = "external_funcs"), + not(feature = "external_crate"), + any(target_arch = "arm", + target_arch = "mips", + target_arch = "mipsel")))] const MIN_ALIGN: uint = 8; -#[cfg(any(target_arch = "x86", - target_arch = "x86_64", - target_arch = "aarch64"))] +#[cfg(all(not(feature = "external_funcs"), + not(feature = "external_crate"), + any(target_arch = "x86", + target_arch = "x86_64", + target_arch = "aarch64"))] const MIN_ALIGN: uint = 16; #[cfg(feature = "external_funcs")] -- cgit 1.4.1-3-g733a5