Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
Ignore dead code lint in tests
Browse files Browse the repository at this point in the history
New in nightly-2024-03-24 from rust-lang/rust#119552.

    warning: field `0` is never read
      --> tests/test_item.rs:64:37
       |
    64 |                 pub struct S<$life>(pub &$life ());
       |                            -        ^^^^^^^^^^^^^
       |                            |
       |                            field in this struct
    ...
    72 |     m!('a);
       |     ------ in this macro invocation
       |
       = note: `#[warn(dead_code)]` on by default
       = note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
       |
    64 |                 pub struct S<$life>(());
       |                                     ~~
  • Loading branch information
dtolnay committed Mar 24, 2024
1 parent 14872ad commit d39fb86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ mod test_none_delimited_single_lifetime {
macro_rules! m {
($life:lifetime) => {
paste! {
pub struct S<$life>(pub &$life ());
pub struct S<$life>(#[allow(dead_code)] pub &$life ());
impl<$life> S<$life> {
fn f() {}
}
Expand Down

0 comments on commit d39fb86

Please sign in to comment.