Skip to content

Commit

Permalink
Suppress dead code warning in test of unit struct remote derive
Browse files Browse the repository at this point in the history
    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)]`
  • Loading branch information
dtolnay committed Jun 27, 2024
1 parent 9e6158e commit f3dfd2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test_suite/tests/test_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ fn test_gen() {

#[derive(Serialize, Deserialize)]
#[serde(remote = "Self")]
#[allow(dead_code)]
struct RemoteSelf;

#[derive(Serialize, Deserialize)]
Expand Down

0 comments on commit f3dfd2a

Please sign in to comment.