Open kayabaNerve opened 2 weeks ago
https://github.com/rust-lang/rust/issues/102238#issuecomment-2211620177 for my comment on the relevant issue.
#[must_use]
trait X {}
fn y<Z: X>(z: Z) -> Z {
z
}
fn a<Z: X>(z: Z) {
y(z);
}
#[must_use]
struct A;
impl X for A {}
fn main() {
a(A);
}
for the MRE.
This is presumably somewhat a bug in Rust itself. I just need to make a MRE and evaluate it.
Identified due to #561.