Open JarredAllen opened 1 day ago
Ah yes I noticed that a while ago. Do note however that this is going to be pretty much the slowest thing we ever provide (find all references is based on textual search then refinement using semantics info - because calculating semantic info is expensive. Searching for operators is going to find a lot of matches).
If I have code like this:
Running "go to definition" on the
<=
will go to the definition of thele
method in theimpl PartialOrd for Foo
(including to the default implementation in thePartialOrd
trait if not explicitly overridden in theimpl
block), but running "go to references" can't go back the other way.It'd be great if I could "go to references" on the
le
function to find all places where<=
is used to compare 2Foo
s. It'd be even greater if, for a type that only implements thepartial_cmp
function and leaves the default implementations alone, "go to references" could find all the<
/<=
/>
/>=
comparison operators (not sure if this second part is feasible, since it does technically go through a different method).