Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions