rust-lang / rust-lang/rust-analyzer
proc-macro names and namerefs are treated inconistently
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
use proc_test::{attr, Derive, proc_macro};
Here we resolve the attr and proc_macro name-ref as functions(should be attribute and macro respectively), Derive as a derive.
This seems to be caused by overlapping namespaces again, BUT the proc-macro functions shouldn't be visible from here in the first place, but our current path resolution ignores visibility.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the proc_test import snippet and inspect rust-analyzer's path resolution for proc-macro names, especially visibility and overlapping namespaces. Done means attr resolves as an attribute, proc_macro as a macro, and Derive as a derive without exposing proc-macro functions from this context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100