-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
rust-analyzer unable to see some types in zbus::fdo
#18138
Comments
Can't reproduce. Things are working fine to me (I didn't check on the linked commit but on HEAD). |
Looks like I linked a fork by accident |
That actually part of the reproducer: i-e when using zbus prior to 4.0^ it worked fine. ^: Precisely pinpointing the exact commit that introduced this issue would a bit difficult since it'll require a long |
Prior to, or after? Because I checked on HEAD, which should have the latest updates. |
Would be nice if you could link a revision that exhibits the problem then |
The latest HEAD of the corrected repo link main, or the main on my personal fork that @Veykril first linked by accident? The latter seems stuck on prior to 4.0 so you should not be able to reproduce there but with former you should be able to reproduce. |
The latest main and also latest crates.io release. |
The HEAD of the correct repo, not the fork. |
Oh, that's very strange. Just to be sure a recent refactor in zbus didn't end up somehow "fixing" this, I created a new project here and as you can see in the attached screencast, auto-completion doesn't work for the method of the generated Screencast.from.2024-09-18.22-30-52.mp4 |
Can reproduce that, funny how we give the completion for |
Ok, with |
Just a shot in the dark but is it possible that |
If it expands to something, rust-analyzer should be able to see that something. It eating its input should not matter. |
@rustbot claim |
This is probably the same issue as #17630. This also has to do with a module shadowing the macro, and here too if I move the reexport of The issue is quite subtle: IDE features (e.g. goto def) do work correctly, but name resolving in the DefMap do not. |
Update: I managed to minimize the problem: mod foo {
macro_rules! x {
() => {
pub struct Foo;
};
}
pub(crate) use x as m;
}
mod bar {
use crate::m;
m!();
fn qux() {
Foo;
}
}
mod m {}
use foo::m;
a. In the same scope of |
Ok, I nailed the problem, and I have a fix, but I need to check because it may prove too expensive... |
Awesome! Thanks so much @ChayimFriedman2 and @Veykril. 👍🙏 |
dbus2/zbus#671
The text was updated successfully, but these errors were encountered: