cargo-c
cargo-c copied to clipboard
cbuild warns about #[cfg(test)]
If I run cargo cbuild I get:
warning: unexpected `cfg` condition name: `test`
--> src/group_record.rs:236:7
|
236 | #[cfg(test)]
| ^^^^
|
How can I get rid of that warning with cbuild? I have a library and unit tests are implemented in the rust files itself.
A current workaround seems to be adding the following to Cargo.toml:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(test)'] }