- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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.25sDesired 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.26sRationale and extra context
No response
Other cases
No response
Rust Version
stable 1.76.0Anything else?
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.