rust-lang / rust-lang/rust-analyzer

Actual definitions should be sorted before re-exports in symbol search

Open
#21,723 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-ide C-feature
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

pub use mymod::MyStruct;

pub mod mymod {
    pub struct MyStruct;
}

If I use the vscode symbol search #MyStruct, it will put the re-export first, but it's much more likely the user is interested in the struct definition when looking for the symbol.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VS Code symbol search with the Rust snippet in the report, using #MyStruct. Start by locating rust-analyzer's symbol-search handling and the ordering logic for definitions and re-exports. Done means the actual struct definition appears before its re-export while preserving symbol-search results.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
search
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.