rust-analyzer
rust-analyzer copied to clipboard
hover over associated functions should show the impl block they are defined in
consider this code:
struct Foo<T>(T);
impl<T: Eq> Foo<T> {
fn new(t: T) -> Self {
Self(t)
}
}
fn main() {
let foo = Foo::new(1.2);
}
This doesn't compile because f64
doesn't implement Eq
, however the hover and popup that shows for new has no mention of the bound T: Eq
from the impl block.
It just shows:
playground::Foo
fn new(t: T) -> Self
I think it should also show the impl block definition, as that is an integral part of the functions signature:
playground::Foo
impl<T: Eq> Foo<T>
fn new(t: T) -> Self
Interested in giving this a shot