From efad3ead528492f1ef9a63d6c582446d8d72f8a1 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Mon, 24 Jan 2022 01:32:45 +0000 Subject: [PATCH] Fix std_detect_file_io --- library/stdarch/crates/std_detect/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/stdarch/crates/std_detect/src/lib.rs b/library/stdarch/crates/std_detect/src/lib.rs index bf9c707cb62d..c0e0de0dd5e6 100644 --- a/library/stdarch/crates/std_detect/src/lib.rs +++ b/library/stdarch/crates/std_detect/src/lib.rs @@ -24,6 +24,11 @@ #[macro_use] extern crate std; +// rust-lang/rust#83888: removing `extern crate` gives an error that `vec_spare> +#[cfg_attr(feature = "std_detect_file_io", allow(unused_extern_crates))] +#[cfg(feature = "std_detect_file_io")] +extern crate alloc; + #[doc(hidden)] #[unstable(feature = "stdsimd", issue = "27731")] pub mod detect;