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

Commit d39fb86

Browse files
committed
Ignore dead code lint in tests
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>(()); | ~~
1 parent 14872ad commit d39fb86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ mod test_none_delimited_single_lifetime {
6161
macro_rules! m {
6262
($life:lifetime) => {
6363
paste! {
64-
pub struct S<$life>(pub &$life ());
64+
pub struct S<$life>(#[allow(dead_code)] pub &$life ());
6565
impl<$life> S<$life> {
6666
fn f() {}
6767
}

0 commit comments

Comments
 (0)