Skip to content

Commit 7a99600

Browse files
committed
Fix(no_std): boxed not in collections
1 parent 56d0acc commit 7a99600

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,16 @@
385385
//! ```
386386
#![cfg_attr(not(feature = "std"), feature(no_std))]
387387
#![cfg_attr(not(feature = "std"), feature(collections))]
388+
#![cfg_attr(not(feature = "std"), feature(alloc))]
388389
#![cfg_attr(not(feature = "std"), no_std)]
389390
#![cfg_attr(feature = "nightly", feature(test))]
390391
#![cfg_attr(feature = "nightly", feature(const_fn))]
391392
#![cfg_attr(feature = "nightly", feature(plugin))]
392393
#![cfg_attr(feature = "nightly", plugin(compiler_error))]
393394
//#![warn(missing_docs)]
394395

396+
#[cfg(not(feature = "std"))]
397+
extern crate alloc;
395398
#[cfg(not(feature = "std"))]
396399
extern crate collections;
397400
#[cfg(feature = "regexp")]
@@ -415,7 +418,8 @@ macro_rules! compiler_error {
415418
mod std {
416419
#[macro_use]
417420
pub use core::{fmt, cmp, iter, option, result, ops, slice, str, mem, convert};
418-
pub use collections::{boxed, vec, string};
421+
pub use alloc::boxed;
422+
pub use collections::{vec, string};
419423
pub mod prelude {
420424
pub use core::prelude as v1;
421425
}

0 commit comments

Comments
 (0)