Closed
Description
Code
trait Zoom {}
struct Foo;
struct Bar;
impl Zoom for Foo {}
Current output
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.25s
Desired output
Compiling playground v0.0.1 (/playground)
warning: struct `Foo` is never constructed
--> src/lib.rs:3:8
|
3 | struct Foo;
| ^^^
|
= note: `#[warn(dead_code)]` on by default
warning: struct `Bar` is never constructed
--> src/lib.rs:4:8
|
4 | struct Bar;
| ^^^
warning: `playground` (lib) generated 2 warnings
Finished dev [unoptimized + debuginfo] target(s) in 0.26s
Rationale and extra context
No response
Other cases
No response
Rust Version
stable 1.76.0