Skip to content

Duplicate references in wasm_bindgen types #13407

@abseee

Description

@abseee

When I issue a textDocument/references request on MyStruct in lib.rs, I expect 3 references. Instead I get 288! VSCode seems to dedupe these results before surfacing them in the UI but other editors may not. Dupes are also returned for MyEnum and its variants. Non-wasm-bindgen tagged types work fine; presumably other macros also trigger this issue but I don't know enough to debug further.

VSCode <-> Rust analyze trace
Expanded lib.rs

rust-analyzer version: 0.3.1238-standalone

rustc version: rustc 1.63.0 (4b91a6ea7 2022-08-08)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Broken WindowBugs / technical debt to be addressed immediatelyC-bugCategory: bugE-has-instructionsIssue has some instructions and pointers to code to get started

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions