fix(compiler) Make it compile with no_std + core.

This commit is contained in:
Ivan Enderlin
2020-05-19 09:36:25 +02:00
parent 63f5cd5302
commit 40eea02af6

View File

@@ -25,13 +25,15 @@
) )
)] )]
mod lib { #[cfg(all(not(feature = "std"), feature = "core"))]
#[cfg(not(feature = "std"))] extern crate alloc;
pub mod std {
#[cfg(feature = "core")]
pub use alloc::{boxed, fmt, string, vec};
#[cfg(feature = "core")] mod lib {
#[cfg(all(not(feature = "std"), feature = "core"))]
pub mod std {
#[macro_use]
pub use alloc::{boxed, string, vec};
pub use core::fmt;
pub use hashbrown as collections; pub use hashbrown as collections;
} }