Closed
Description
Consider this code:
trait A {
fn woop(&self);
}
trait B {
const X: usize;
fn woop(&self);
}
impl<A> B for A
where
A: B,
{
const X: usize = 1;
fn woop(&self) {
println!("{}", A::X);
// ^ this is considered as `trait A` not the generic param `A` by r-a.
}
}
fn main() {}
See:
This also impacts rename, which gets a tad confused:
Rustc however does resolve this properly and the program provided compiles fine.