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
Module alias misidentified as function declaration #4202
Comments
Good catch! I think this should be fixed in |
It's a part where I didn't already dig in. I will give a try this week :) |
I took a look at the code in And it seems I should add to https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_ide_db/src/defs.rs#L121 this kind of pattern: ast::Alias(it) => {
let def = sema.to_def(&it)?;
Some(Definition::ModuleDef(def.into()))
}, And then add ToDef implementation for |
Maybe duplicates #4030 |
I belive #4030 is different. There, we confuse namespaces, here, we don't handle aliases at all.
I dont't think so, as there's there's no |
@matklad Did you mean to link to |
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
With
Cargo.toml
:In
src/lib.rs
:glm
is identified as a function declaration. It is a module alias, so it should be identified as anamespace
, probably with some sort ofalias
modifier.The text was updated successfully, but these errors were encountered: