diff --git a/crates/sel4-capdl-initializer/types/src/footprint.rs b/crates/sel4-capdl-initializer/types/src/footprint.rs index 7442f6e1c..63dd77223 100644 --- a/crates/sel4-capdl-initializer/types/src/footprint.rs +++ b/crates/sel4-capdl-initializer/types/src/footprint.rs @@ -6,7 +6,7 @@ use core::mem::size_of_val; -#[cfg(feature = "alloc")] +#[cfg(all(feature = "alloc", not(feature = "std")))] use alloc::string::String; use crate::frame_init::*; diff --git a/crates/sel4-capdl-initializer/types/src/frame_init.rs b/crates/sel4-capdl-initializer/types/src/frame_init.rs index 1166a2439..4c037dfcb 100644 --- a/crates/sel4-capdl-initializer/types/src/frame_init.rs +++ b/crates/sel4-capdl-initializer/types/src/frame_init.rs @@ -10,7 +10,7 @@ use core::ops::Range; #[cfg(feature = "deflate")] use core::iter; -#[cfg(feature = "alloc")] +#[cfg(all(feature = "alloc", not(feature = "std")))] use alloc::{string::String, vec::Vec}; #[cfg(feature = "serde")] diff --git a/crates/sel4-capdl-initializer/types/src/indirect.rs b/crates/sel4-capdl-initializer/types/src/indirect.rs index edb7b2b40..704e2295f 100644 --- a/crates/sel4-capdl-initializer/types/src/indirect.rs +++ b/crates/sel4-capdl-initializer/types/src/indirect.rs @@ -11,7 +11,7 @@ use core::ops::Deref; #[cfg(feature = "alloc")] use core::marker::PhantomData; -#[cfg(feature = "alloc")] +#[cfg(all(feature = "alloc", not(feature = "std")))] use alloc::boxed::Box; #[cfg(feature = "serde")] diff --git a/crates/sel4-capdl-initializer/types/src/object_name.rs b/crates/sel4-capdl-initializer/types/src/object_name.rs index bf9e23b8f..8ca2633ee 100644 --- a/crates/sel4-capdl-initializer/types/src/object_name.rs +++ b/crates/sel4-capdl-initializer/types/src/object_name.rs @@ -7,7 +7,7 @@ use core::ops::Range; use core::str; -#[cfg(feature = "alloc")] +#[cfg(all(feature = "alloc", not(feature = "std")))] use alloc::string::String; #[cfg(feature = "serde")]