diff options
| author | Miguel Ojeda <ojeda@kernel.org> | 2021-10-14 20:47:14 +0200 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2022-08-26 16:44:32 +0200 |
| commit | 614c2e404a2eae63c2f392fd90e98960b6ec59bc (patch) | |
| tree | 598167050ba4ed6637c8290c3122c2ec4f3f7109 /library/alloc/src/lib.rs | |
| parent | 8a13871b69924b74cfa1d737f2894068b37ea7ea (diff) | |
| download | rust-614c2e404a2eae63c2f392fd90e98960b6ec59bc.tar.gz rust-614c2e404a2eae63c2f392fd90e98960b6ec59bc.zip | |
`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 <ojeda@kernel.org>
Diffstat (limited to 'library/alloc/src/lib.rs')
| -rw-r--r-- | library/alloc/src/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
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; |
