Description
struct Foo<const T: bool>;
impl Foo<true> {
fn foo(self) {} // <- Landed here
}
impl Foo<false> {
fn foo(self) {} // <- Expected to land here
}
fn main() {
const B: bool = false;
let foo: Foo<B> = Foo;
foo.foo(); // Go to Definition of `foo()`
}
When used with const
variable as type. Foo<B>
, It doesn't pointed to correct implementation.
But Foo<false>
did pointed to the right implementation.
rust-analyzer version: 0.3.1426 (2023-03-05)
rustc version: 1.67.1