Skip to content

Commit 06ec5fa

Browse files
committed
Add regression test for rust-lang#59003
Signed-off-by: Yuki Okushi <[email protected]>
1 parent 87a2408 commit 06ec5fa

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// check-pass
2+
3+
// Make sure we don't have any false positives about the "struct is never constructed" lint.
4+
5+
#![deny(dead_code)]
6+
7+
struct Foo {
8+
#[allow(dead_code)]
9+
inner: u32,
10+
}
11+
12+
impl From<u32> for Foo {
13+
fn from(inner: u32) -> Self {
14+
Self { inner }
15+
}
16+
}
17+
18+
fn main() {}

0 commit comments

Comments
 (0)