Skip to content

Commit

Permalink
Ignore new dead_code warnings in test
Browse files Browse the repository at this point in the history
Since nightly-2024-03-12.

    warning: struct `S` is never constructed
       --> tests/test.rs:366:12
        |
    366 |     struct S {}
        |            ^
        |
        = note: `#[warn(dead_code)]` on by default

    warning: struct `Struct` is never constructed
        --> tests/test.rs:1492:12
         |
    1492 |     struct Struct;
         |            ^^^^^^
  • Loading branch information
dtolnay committed Mar 12, 2024
1 parent d8c07fc commit 62969d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ pub mod issue23 {
}
}

#[allow(dead_code)]
struct S {}

#[async_trait]
Expand Down Expand Up @@ -1489,6 +1490,7 @@ pub mod issue226 {
async fn cfg_param_tuple(&self, (left, right): (u8, u8));
}

#[allow(dead_code)]
struct Struct;

#[async_trait]
Expand Down

0 comments on commit 62969d5

Please sign in to comment.