Code
trait Tr {
type X;
}
impl Tr for () {
type X = Self;
}
fn foo() -> impl Tr {}
fn main() {
foo();
}
Current output
Desired output
warning: associated type `X` is never used
--> src/main.rs:2:11
|
1 | trait Tr {
| -- associated type in this trait
2 | type X;
| ^
|
= note: `#[warn(dead_code)]` on by default
Rationale and extra context
No response
Other cases
No response
Rust Version
Build using the Nightly version: 1.81.0-nightly
(2024-07-12 c6727fc9b5c64cefa726)
Anything else?
No response
Code
Current output
Desired output
Rationale and extra context
No response
Other cases
No response
Rust Version
Anything else?
No response