Skip to content

Commit 79925ac

Browse files
committed
Ignore dead_code warning in regression test
warning: field `0` is never read --> test_suite/tests/regression/issue2846.rs:8:45 | 8 | pub struct S(#[serde(with = $with)] i32); | - field in this struct ^^^ ... 12 | declare_in_macro!("with"); | ------------------------- in this macro invocation | = help: consider removing this field = note: `#[warn(dead_code)]` on by default = note: this warning originates in the macro `declare_in_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
1 parent b60e409 commit 79925ac

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test_suite/tests/regression/issue2846.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ use serde_derive::Deserialize;
55
macro_rules! declare_in_macro {
66
($with:literal) => {
77
#[derive(Deserialize)]
8-
pub struct S(#[serde(with = $with)] i32);
8+
pub struct S(
9+
#[serde(with = $with)]
10+
#[allow(dead_code)]
11+
i32,
12+
);
913
};
1014
}
1115

0 commit comments

Comments
 (0)