]> git.lizzy.rs Git - rust.git/blobdiff - src/liballoc/lib.rs
Rollup merge of #23056 - awlnx:master, r=nrc
[rust.git] / src / liballoc / lib.rs
index 828e6b8dd7614b93a8d191808bbd7073c5ec2b2d..5c9a42a8a71747534e2dfce3e98ca1efe6726272 100644 (file)
 
 // Primitive types using the heaps above
 
+// Need to conditionally define the mod from `boxed.rs` to avoid
+// duplicating the lang-items when building in test cfg; but also need
+// to allow code to have `use boxed::HEAP;`
+// and `use boxed::Box;` declarations.
 #[cfg(not(test))]
 pub mod boxed;
 #[cfg(test)]
+mod boxed { pub use std::boxed::{Box, HEAP}; }
+#[cfg(test)]
 mod boxed_test;
 pub mod arc;
 pub mod rc;