From 614c2e404a2eae63c2f392fd90e98960b6ec59bc Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Thu, 14 Oct 2021 20:47:14 +0200 Subject: `alloc`: add unstable cfg features `no_rc` and `no_sync` In Rust for Linux we are using these to make `alloc` a bit more modular. A `run-make-fulldeps` test is added for each of them, so that enabling each of them independently is kept in a compilable state. Signed-off-by: Miguel Ojeda --- library/alloc/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'library/alloc') diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index ad6d19bbc68..05e5f7a08a5 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -69,6 +69,8 @@ any(not(feature = "miri-test-libstd"), test, doctest), no_global_oom_handling, not(no_global_oom_handling), + not(no_rc), + not(no_sync), target_has_atomic = "ptr" ))] #![no_std] @@ -223,16 +225,17 @@ mod boxed { } pub mod borrow; pub mod collections; -#[cfg(not(no_global_oom_handling))] +#[cfg(all(not(no_rc), not(no_sync), not(no_global_oom_handling)))] pub mod ffi; pub mod fmt; +#[cfg(not(no_rc))] pub mod rc; pub mod slice; pub mod str; pub mod string; -#[cfg(target_has_atomic = "ptr")] +#[cfg(all(not(no_rc), not(no_sync), target_has_atomic = "ptr"))] pub mod sync; -#[cfg(all(not(no_global_oom_handling), target_has_atomic = "ptr"))] +#[cfg(all(not(no_global_oom_handling), not(no_rc), not(no_sync), target_has_atomic = "ptr"))] pub mod task; #[cfg(test)] mod tests; -- cgit 1.4.1-3-g733a5