From 0792b167ae60bd028097c4aea4d9c4c8fe211764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Harabie=C5=84?= Date: Wed, 17 Jul 2019 19:03:48 +0200 Subject: [PATCH] Use alloc compiler feature only if "alloc" feature is active This brings fatfs closer to working on stable Rust - only stable core-io crate is needed now. This change was merged previously to master in commit 64eec4b3ad3981ff1c3f5225897d26e5b427a4df --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 3ec7433..2773d79 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -55,7 +55,7 @@ #![crate_type = "lib"] #![crate_name = "fatfs"] #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(not(feature = "std"), feature(alloc))] +#![cfg_attr(all(not(feature = "std"), feature = "alloc"), feature(alloc))] // Disable warnings to not clutter code with cfg too much #![cfg_attr(not(feature = "alloc"), allow(dead_code, unused_imports))]