From af2e791602ca59a5258b6d0f8f49845213a916a2 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Mon, 10 Feb 2020 15:24:10 -0500 Subject: [PATCH] avoid compiling avx512_detected() when the "c_avx512" feature is disabled https://github.com/rust-lang/rust/issues/68905 is currently causing nightly builds to fail, unless `--no-default-features` is used. This change means that the default build will succeed, and the failure will only happen when the "c_avx512" is enabled. The `b3sum` crate will still fail to build on nightly, because it enables that feature, but most callers should start succeeding on nightly. --- src/platform.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform.rs b/src/platform.rs index abf9d300..b453a6ef 100644 --- a/src/platform.rs +++ b/src/platform.rs @@ -252,6 +252,7 @@ impl Platform { // Note that AVX-512 is divided into multiple featuresets, and we use two of // them, F and VL. +#[cfg(feature = "c_avx512")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] #[inline(always)] pub fn avx512_detected() -> bool {