Skip to content

callable token modifier emitted on locals of unknown type #22487

@ada4a

Description

@ada4a

code snippet to reproduce:

//- minicore: fn
fn foo() {
    let a: T;
}

Here, a is of type T which isn't defined anywhere, which in turn causes a callable token modifier to be added to a. If we define T, e.g. by adding it as a generic to foo, then the token modifier is (correctly) no longer added.

Closely related to #22478 -- in fact, the fix is the same, see #22486.

rust-analyzer version: rust-analyzer 1.95.0 (5980761 2026-04-14)

rustc version: rustc 1.95.0 (59807616e 2026-04-14)

editor or extension: VSCode, extension version 0.3.2913

relevant settings: none

@rustbot claim

Metadata

Metadata

Assignees

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