rust-lang / rust-lang/rust-analyzer

Floats and array const values not displayed on hover

Open
#21,811 5 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-hover C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

rust-analyzer version: 0.3.2819

rustc version: rustc 1.93.0 (254b59607 2026-01-19)

editor or extension: VSCode, 1.110.1 61b3d0ab13be7dda2389f1d3e60a119c7f660cc3 x64

relevant settings: -

repository link (if public, optional): -

code snippet to reproduce:

const FOO: usize = 1; // can see this value during hover
const BAR: f32 = 1.0; // cannot see this value during hover
const BAZ: [usize; 1] = [1]; // cannot see this value during hover
Image Image Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the Rust snippet in the report and compare hover output for the usize, f32, and array constants. Start by locating rust-analyzer's hover handling and value display logic, then add coverage for the missing cases; done means float and array constant values appear on hover without regressing the existing usize case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.