Repository navigation
Commit f75af00
committed
fix(rust-lsp): a generic impl's self type drops its type arguments
The extractor fix above names a generic impl's methods `Gen.in_generic`
on both the def and the call-scope side. The Rust LSP still built its
self type from the impl's raw text, `Gen<T>`. That broke three things:
- its caller QN (`Gen<T>.in_generic`) no longer joined the pipeline's
call scope, so every LSP row inside a generic or lifetime impl was
dropped for a registry guess. On 9 Rust repos that turned 1,927
lsp_* edges into suffix_match/unique_name;
- `self.` and `Self::` dispatch never found the impl's own methods;
`Self::assoc_g()` had no edge at all, on main as well;
- the return-type harvest never matched those methods, so chained
calls on them stayed untyped.
Strip the generic arguments from the impl's self type in both places.
Text that starts with `<` (a qualified path) is left alone.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>1 parent 2fbbecc commit f75af00
2 files changed
Lines changed: 44 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
309 | 325 | | |
310 | 326 | | |
311 | 327 | | |
| |||
5245 | 5261 | | |
5246 | 5262 | | |
5247 | 5263 | | |
| 5264 | + | |
5248 | 5265 | | |
5249 | 5266 | | |
5250 | 5267 | | |
| |||
5999 | 6016 | | |
6000 | 6017 | | |
6001 | 6018 | | |
| 6019 | + | |
6002 | 6020 | | |
6003 | 6021 | | |
6004 | 6022 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8879 | 8879 | | |
8880 | 8880 | | |
8881 | 8881 | | |
8882 | | - | |
8883 | | - | |
8884 | | - | |
8885 | | - | |
8886 | | - | |
8887 | | - | |
8888 | | - | |
8889 | | - | |
8890 | | - | |
8891 | | - | |
8892 | | - | |
| 8882 | + | |
| 8883 | + | |
| 8884 | + | |
| 8885 | + | |
| 8886 | + | |
| 8887 | + | |
| 8888 | + | |
| 8889 | + | |
| 8890 | + | |
| 8891 | + | |
| 8892 | + | |
| 8893 | + | |
| 8894 | + | |
| 8895 | + | |
| 8896 | + | |
8893 | 8897 | | |
8894 | 8898 | | |
8895 | 8899 | | |
| |||
8918 | 8922 | | |
8919 | 8923 | | |
8920 | 8924 | | |
| 8925 | + | |
| 8926 | + | |
| 8927 | + | |
| 8928 | + | |
| 8929 | + | |
| 8930 | + | |
| 8931 | + | |
| 8932 | + | |
| 8933 | + | |
| 8934 | + | |
| 8935 | + | |
8921 | 8936 | | |
8922 | 8937 | | |
8923 | 8938 | | |
| |||
0 commit comments