Stream: t-compiler/rust-analyzer

Topic: missing method completions


matklad (Feb 23 2021 at 12:04, on Zulip):

Hey, I think we are missing some inherent methonds in completion (but they resolve fine). Has anyone else noticed this? Seems like a regression

Florian Diebold (Feb 23 2021 at 12:05, on Zulip):

there's that weird bug where private methods don't show up after a macro call in the same function

matklad (Feb 23 2021 at 12:06, on Zulip):

yup, thats is

Florian Diebold (Feb 23 2021 at 12:06, on Zulip):

rust-analyzer#7728

Florian Diebold (Feb 23 2021 at 12:06, on Zulip):

I wonder if the local item resolution changes might have something to do with it

matklad (Feb 23 2021 at 12:07, on Zulip):

cc @Jonas Schievink [he/him]

Jonas Schievink [he/him] (Feb 23 2021 at 12:07, on Zulip):

yeah probably

Jonas Schievink [he/him] (Feb 23 2021 at 12:08, on Zulip):

putting the code into the crate root makes it work.

aaargh not again

matklad (Feb 23 2021 at 12:09, on Zulip):

oh, I see now

matklad (Feb 23 2021 at 12:09, on Zulip):

that's cursed

matklad (Feb 23 2021 at 12:10, on Zulip):

I mean, I see how we may mix up current crate in expander, I don't know wheter the bug is exactly

Kirill Bulatov (Feb 23 2021 at 12:10, on Zulip):

Not sure if related, but even fields are not sometimes completed in the test functions for me.
Although it's non-deterministic and I've not managed to extract an mre out of that.

Florian Diebold (Feb 23 2021 at 12:10, on Zulip):

this bug also affects fields

Jonas Schievink [he/him] (Feb 23 2021 at 13:23, on Zulip):

ah, the problem is probably just Visibility::is_visible_from_def_map not handling block def maps

Jonas Schievink [he/him] (Feb 23 2021 at 16:57, on Zulip):

that was pretty painful, but fixed in https://github.com/rust-analyzer/rust-analyzer/pull/7768

Florian Diebold (Feb 23 2021 at 17:08, on Zulip):

hmm why did it depend on the position in the function though?

Last update: Jul 26 2021 at 14:00UTC