summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/dead-code/issue-59003.rs
blob: 966d6412870b682b3a2416930aeea0e0f8e7ce2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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() {}