Suppress dead code warning in test of unit struct remote derive

error: struct `RemoteSelf` is never constructed
       --> test_suite/tests/test_gen.rs:425:12
        |
    425 |     struct RemoteSelf;
        |            ^^^^^^^^^^
        |
    note: the lint level is defined here
       --> test_suite/tests/test_gen.rs:5:9
        |
    5   | #![deny(warnings)]
        |         ^^^^^^^^
        = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`
This commit is contained in:
David Tolnay
2024-06-26 19:41:19 -07:00
parent 9e6158e9e6
commit f3dfd2a237
+1
View File
@@ -422,6 +422,7 @@ fn test_gen() {
#[derive(Serialize, Deserialize)]
#[serde(remote = "Self")]
#[allow(dead_code)]
struct RemoteSelf;
#[derive(Serialize, Deserialize)]