Unbreak Crubit tests with the latest Rust compiler by allowing dead code in tests
The new version of the Rust compiler has started to identify dead code in our
tests, for example:
```rust
error: struct `SomeStruct` is never constructed
--> <crubit_unittests.rs>:2:28
|
2 | pub struct SomeStruct(f32);
| ^^^^^^^^^^
|
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
error: aborting due to 1 previous error
```
PiperOrigin-RevId: 648720856
Change-Id: I630d5ff7747f0c5df4be7308c716c44b862b4318
diff --git a/cc_bindings_from_rs/run_compiler_test_support.rs b/cc_bindings_from_rs/run_compiler_test_support.rs
index e61dfeb..dce5f3b 100644
--- a/cc_bindings_from_rs/run_compiler_test_support.rs
+++ b/cc_bindings_from_rs/run_compiler_test_support.rs
@@ -71,6 +71,7 @@
lint_opts: vec![
("warnings".to_string(), rustc_lint_defs::Level::Deny),
("stable_features".to_string(), rustc_lint_defs::Level::Allow),
+ ("dead_code".to_string(), rustc_lint_defs::Level::Allow),
],
cg: CodegenOptions {
// As pointed out in `panics_and_exceptions.md` the tool only supports `-C