diff --git a/tests/common/mod.rs b/tests/common/mod.rs index a8e7b6b..af1c2ef 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -30,6 +30,8 @@ pub fn assert_cargo_build(package_folder: tempfile::TempDir) { let mut command = Command::new("cargo"); command.arg("build"); command.current_dir(package_folder.path()); + // Error on invalid cfg(feature) directives + command.env("RUSTFLAGS", "-D unexpected_cfgs"); let exec_result = command.output();