Commit 6c8b63ce authored by David Brown's avatar David Brown Committed by David Brown
Browse files

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: default avatarDavid Brown <david.brown@linaro.org>
parent 15556acd
Loading
Loading
Loading
Loading
+1 −0
Changes for lib/rust/zephyr/src/lib.rs: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
//! Zephyr.

#![no_std]
#![allow(unexpected_cfgs)]

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