Skip to content

Commit 35e5b2a

Browse files
committed
zephyr: Fix some warnings by being conditional
Use of Box depends on Alloc being enabled, so also conditionalize the extern and use declarations. Signed-off-by: David Brown <[email protected]>
1 parent 0a081f3 commit 35e5b2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

zephyr/src/sys/thread.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
//! });
3434
//! ```
3535
36+
#[cfg(CONFIG_RUST_ALLOC)]
3637
extern crate alloc;
3738

39+
#[cfg(CONFIG_RUST_ALLOC)]
3840
use alloc::boxed::Box;
3941
use core::{cell::UnsafeCell, ffi::{c_int, c_void}};
4042

0 commit comments

Comments
 (0)