Open jplatte opened 2 years ago
More generally, occurences should be classified into following buckets:
LSP doesn't currently have a nice way to present this in UI though. For structs, we have a horrible hack that seraching for {
or (
narrows the search down to just constructors. I wonder if we can generalize that to writes somehow...
I guess for variables we can allow triggering search on the mut
keyword, but that doesn't work for fields.
Some references to code:
Note that the second function shouldnt' probably exist -- instead, the relevant info shoudl just be present in ReferenceAccess (which is missnamed, let me fix that...)
cc #10426
In addition to "find all references", it would sometimes be very useful to find all places where a certain variable or struct field is either written to directly, or mutably borrowed.