-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
goto-def on e.index() wrongly goes to the Index trait #5353
Comments
Hm. Inherent methods should resolve without problems usually. Is the type of |
It seems not, and it doesn't even figure out the type of the
Sort of -- in Vim it jumps to the right function, but in VSCode it pops up a menu to choose |
If you remove the |
No effect. |
(You could also try removing that |
Ah, yes, that's detected in build.rs -- when I enable that setting in VSCode, it works! Now if I can figure out the right way to set that for ALE... |
Regarding ALE, it seems there was a PR for "workspace/configuration" that was dropped: But we can consider this immediate issue resolved, thanks! |
In indexmap's
map::tests::entry
, twoe.index()
calls are being associated with the wrong method, here and here. They go tocore::ops::Index::index
, when they ought to go toEntry::index
. While this code does haveops::Index
in scope, inherent methods should always take precedence.For posterity, note those links are specifically using commit indexmap-rs/indexmap@299d950.
I only noticed this after updating to release 2020-07-13, because it started warning "Expected 1 argument, found 0" per #5270. However, I did confirm that goto-def was wrong on those calls with 2020-07-06 too. I guess with the new warning, it increases the expectation that method resolution must be correct to avoid false errors.
(I'm using Vim+ALE, but I doubt that specifically makes any difference.)
The text was updated successfully, but these errors were encountered: