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
Anything else?
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Urgau commentedon Feb 9, 2024
This has just being fixed in nightly. See #118257.