Open
Description
Code
#![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();
}
Current output
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.
Rationale and extra context
No response
Other cases
No response
Rust Version
Build using the Nightly version: 1.81.0-nightly
(2024-06-19 d8a38b00024cd7156dea)
Anything else?
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To Do