Skip to content

Commit bc8878b

Browse files
Rollup merge of rust-lang#110209 - JohnTitor:issue-59003, r=compiler-errors
Add regression test for rust-lang#59003 Closes rust-lang#59003 r? compiler-errors
2 parents 3427cec + 06ec5fa commit bc8878b

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)