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:
commit
49769260a3
1 changed files with 18 additions and 0 deletions
18
tests/ui/lint/dead-code/issue-59003.rs
Normal file
18
tests/ui/lint/dead-code/issue-59003.rs
Normal 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() {}
|
Loading…
Add table
Add a link
Reference in a new issue