about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@Yahoo.com>2014-12-30 06:13:08 +0100
committerJohn Ericson <Ericson2314@Yahoo.com>2015-01-07 19:22:22 +0000
commitb1b4bc90b8a1d2fc73b76cbbd0104f6c1acee33f (patch)
treed311d254b1073c169fb3b79743085a02baa661fa /src/liballoc
parentea9d5c96536059b232dd6aa40af7a1d181f7b196 (diff)
downloadrust-b1b4bc90b8a1d2fc73b76cbbd0104f6c1acee33f.tar.gz
rust-b1b4bc90b8a1d2fc73b76cbbd0104f6c1acee33f.zip
Fix warning in liballoc about unused constant MIN_ALIGN when cfg(feature = external_*)
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/heap.rs16
1 files changed, 10 insertions, 6 deletions
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")]