build.rs: Use rsconf::declare_dependency()

This new feature in rsconf 0.2.0 resolves the compile-time warnings we get under
rustc 1.80+ about unrecognized cfg names by informing cargo of all valid cfg
names/values even when the cfg in question isn't enabled.
This commit is contained in:
Mahmoud Al-Qudsi 2024-05-09 14:21:05 -05:00
parent 2faf1159fa
commit a7bde3921b

View file

@ -92,8 +92,7 @@ fn detect_cfgs(target: &mut Target) {
] { ] {
match handler(target) { match handler(target) {
Err(e) => rsconf::warn!("{}: {}", name, e), Err(e) => rsconf::warn!("{}: {}", name, e),
Ok(true) => rsconf::enable_cfg(name), Ok(enabled) => rsconf::declare_cfg(name, enabled),
Ok(false) => (),
} }
} }
} }