Skip to content

Commit 4e71b39

Browse files
committed
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 <[email protected]>
1 parent 88a076c commit 4e71b39

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

alloc/src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
any(not(feature = "miri-test-libstd"), test, doctest),
7070
no_global_oom_handling,
7171
not(no_global_oom_handling),
72+
not(no_rc),
73+
not(no_sync),
7274
target_has_atomic = "ptr"
7375
))]
7476
#![no_std]
@@ -223,16 +225,17 @@ mod boxed {
223225
}
224226
pub mod borrow;
225227
pub mod collections;
226-
#[cfg(not(no_global_oom_handling))]
228+
#[cfg(all(not(no_rc), not(no_sync), not(no_global_oom_handling)))]
227229
pub mod ffi;
228230
pub mod fmt;
231+
#[cfg(not(no_rc))]
229232
pub mod rc;
230233
pub mod slice;
231234
pub mod str;
232235
pub mod string;
233-
#[cfg(target_has_atomic = "ptr")]
236+
#[cfg(all(not(no_rc), not(no_sync), target_has_atomic = "ptr"))]
234237
pub mod sync;
235-
#[cfg(all(not(no_global_oom_handling), target_has_atomic = "ptr"))]
238+
#[cfg(all(not(no_global_oom_handling), not(no_rc), not(no_sync), target_has_atomic = "ptr"))]
236239
pub mod task;
237240
#[cfg(test)]
238241
mod tests;

0 commit comments

Comments
 (0)