Skip to content

Commit 6c8b63c

Browse files
committed
rust: Ignore unknown cfgs in the zephyr crate
We use the `#[cfg(...)]` directive in rust to pass Kconfig values through. Because it is possible for the code to depend on a Kconfig value that isn't present in a given build, there isn't a way for us to tell the Rust toolchain about all possible config values. For now, just disable this warning entirely. This functionality could be supported by the patch validation scripts, which seems like a better place than trying to gather a list of all possible configs at build time. Signed-off-by: David Brown <[email protected]>
1 parent 15556ac commit 6c8b63c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/rust/zephyr/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//! Zephyr.
88
99
#![no_std]
10+
#![allow(unexpected_cfgs)]
1011

1112
// Bring in the generated kconfig module
1213
include!(concat!(env!("OUT_DIR"), "/kconfig.rs"));

0 commit comments

Comments
 (0)