trait Zoom {}
struct Foo;
struct Bar;
impl Zoom for Foo {}
Warns Bar is unused but not Foo.
Compiling playground v0.0.1 (/playground)
warning: struct `Bar` is never constructed
--> src/lib.rs:4:8
|
4 | struct Bar;
| ^^^
|
= note: `#[warn(dead_code)]` on by default
warning: `playground` (lib) generated 1 warning
Finished dev [unoptimized + debuginfo] target(s) in 0.34s
Min example:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f9122e0d0aaecb171c6fded1d8589f19
Warns Bar is unused but not Foo.