Skip to content

Commit

Permalink
Ignore dead code lint in test
Browse files Browse the repository at this point in the history
    warning: fields `x` and `y` are never read
       --> tests/test_ensure.rs:467:13
        |
    466 |     pub struct Point {
        |                ----- fields in this struct
    467 |         pub x: i32,
        |             ^
    468 |         pub y: i32,
        |             ^
        |
        = note: `Point` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
        = note: `#[warn(dead_code)]` on by default
  • Loading branch information
dtolnay committed Mar 24, 2024
1 parent b3ceb70 commit 45e5a58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_ensure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ fn test_trailer() {
fn test_whitespace() {
#[derive(Debug)]
pub struct Point {
#[allow(dead_code)]
pub x: i32,
#[allow(dead_code)]
pub y: i32,
}

Expand Down

0 comments on commit 45e5a58

Please sign in to comment.