mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
19 lines
287 B
Rust
19 lines
287 B
Rust
//@ check-pass
|
|
|
|
// Make sure we don't have any false positives about the "struct is never constructed" lint.
|
|
|
|
#![deny(dead_code)]
|
|
|
|
#[allow(dead_code)]
|
|
struct Foo {
|
|
inner: u32,
|
|
}
|
|
|
|
impl From<u32> for Foo {
|
|
fn from(inner: u32) -> Self {
|
|
Self { inner }
|
|
}
|
|
}
|
|
|
|
fn main() {}
|