1
Fork 0

Rollup merge of #110209 - JohnTitor:issue-59003, r=compiler-errors

Add regression test for #59003

Closes #59003
r? compiler-errors
This commit is contained in:
Matthias Krüger 2023-04-12 17:04:33 +02:00 committed by GitHub
commit 49769260a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,18 @@
// check-pass
// Make sure we don't have any false positives about the "struct is never constructed" lint.
#![deny(dead_code)]
struct Foo {
#[allow(dead_code)]
inner: u32,
}
impl From<u32> for Foo {
fn from(inner: u32) -> Self {
Self { inner }
}
}
fn main() {}