Skip to content

variables with incomplete type inference produce "callable" semantic token #21717

@Quelfth

Description

@Quelfth

rust-analyzer version: rust-analyzer 1 (7cb789d 2026-02-01)

rustc version: 1.95.0-nightly (7057231bd 2026-02-11)

editor or extension: helix

code snippet to reproduce:

let some_vec = Vec::new();
// no code to further narrow down that actual element type

Any variable for which type inference is incomplete seems to receive the callable semantic token modifier. Clearly this should happen only when the variable is actually known to be callable and not just when it isn't known not to be.

I'm reasonably sure this has not always been the case. I remember a time when I had highlighting for this semantic token modifier without seeing it in these cases. I don't know when it started exactly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions