Skip to content

Rust auto-import selecting the incorrect entry #20148

Closed
@road2react

Description

@road2react

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When there are multiple similar items, it always imports the first one, even if the other ones are selected.

Example:

fn main() {
    let x = Weak
}

When auto-importing Weak, selecting std::sync::Weak imports std::rc::Weak instead.

image

image

Environment

Zed: v0.159.5 (Zed)
OS: Linux Wayland arch unknown
Memory: 93.5 GiB
Architecture: x86_64
GPU: AMD Radeon 680M (RADV REMBRANDT) || radv || Mesa 24.2.6-arch1.1

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug[core label]can't reproduceIssue that can't be reproduced (transient, invalid, etc)languageAn umbrella label for all programming languages syntax behaviorslanguage serverAn umbrella label for all language serversrustRust programming language support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions