Warning
This post was published 40 days ago. The information described in this article may have changed.
struct Test(bool);
impl AsRef<bool> for Test {
fn as_ref(&self) -> &bool {
&self.0
}
}
impl From<bool> for Test {
fn from(value: bool) -> Self {
Self { 0: value }
}
}
fn main() {}
Compiling playground v0.0.1 (/playground)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.74s
Why is there no dead_code
warning (never constructed, never read)?
There should be.
2 posts - 2 participants
🏷️ rust_feed