rust/tests/ui/lint/dead-code/issue-59003.rs
Yuki Okushi 06ec5faccb
Add regression test for #59003
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-04-12 06:24:49 +09:00

19 lines
290 B
Rust

// 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() {}