Skip to content

Commit 1185f89

Browse files
authored
Merge pull request #36 from Rust-for-Linux/rust-assert-cfg
Ensure we don't break conditional compilation
2 parents 9dfb40b + d0a8472 commit 1185f89

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rust/kernel/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
#![no_std]
66
#![feature(allocator_api, alloc_error_handler)]
77

8+
// Ensure conditional compilation based on the kernel configuration works;
9+
// otherwise we may silently break things like initcall handling.
10+
#[cfg(not(CONFIG_HAS_RUST))]
11+
compile_error!("Missing kernel configuration for conditional compilation");
12+
813
extern crate alloc;
914

1015
use core::panic::PanicInfo;

0 commit comments

Comments
 (0)