Open mu001999 opened 4 months ago
#![feature(associated_const_equality)] trait Tr { const I: i32; } impl Tr for () { const I: i32 = 1; } fn foo() -> impl Tr<I = 1> {} fn main() { foo(); }
warning: associated constant `I` is never used --> src/main.rs:4:11 | 3 | trait Tr { | -- associated constant in this trait 4 | const I: i32; | ^ | = note: `#[warn(dead_code)]` on by default warning: `playground` (bin "playground") generated 1 warning
### Desired output ```Shell No warning.
No response
Build using the Nightly version: 1.81.0-nightly (2024-06-19 d8a38b00024cd7156dea)
@rustbot label +L-dead_code +F-associated_const_equality
Code
Current output
Rationale and extra context
No response
Other cases
No response
Rust Version
Anything else?
No response