Skip to content

Commit

Permalink
Resolve duplicated_attributes clippy lint in test
Browse files Browse the repository at this point in the history
    warning: duplicated attribute
      --> tests/common/mod.rs:1:10
       |
    1  | #![allow(dead_code)]
       |          ^^^^^^^^^
       |
    note: first defined here
      --> tests/test_precedence.rs:55:9
       |
    55 | #[allow(dead_code)]
       |         ^^^^^^^^^
    help: remove this attribute
      --> tests/common/mod.rs:1:10
       |
    1  | #![allow(dead_code)]
       |          ^^^^^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duplicated_attributes
       = note: `-W clippy::duplicated-attributes` implied by `-W clippy::all`
       = help: to override `-W clippy::all` add `#[allow(clippy::duplicated_attributes)]`

    warning: duplicated attribute
      --> tests/common/mod.rs:1:10
       |
    1  | #![allow(dead_code)]
       |          ^^^^^^^^^
       |
    note: first defined here
      --> tests/test_round_trip.rs:47:9
       |
    47 | #[allow(dead_code)]
       |         ^^^^^^^^^
    help: remove this attribute
      --> tests/common/mod.rs:1:10
       |
    1  | #![allow(dead_code)]
       |          ^^^^^^^^^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duplicated_attributes
       = note: `-W clippy::duplicated-attributes` implied by `-W clippy::all`
       = help: to override `-W clippy::all` add `#[allow(clippy::duplicated_attributes)]`
  • Loading branch information
dtolnay committed Apr 20, 2024
1 parent 76beaff commit 19756f4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions tests/test_precedence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ use std::sync::atomic::{AtomicUsize, Ordering};
#[macro_use]
mod macros;

#[allow(dead_code)]
mod common;

mod repo;

#[test]
Expand Down
2 changes: 0 additions & 2 deletions tests/test_round_trip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ use std::time::Instant;
#[macro_use]
mod macros;

#[allow(dead_code)]
mod common;

mod repo;

#[test]
Expand Down

0 comments on commit 19756f4

Please sign in to comment.