rust-lang / rust-lang/rust-analyzer
Floats and array const values not displayed on hover
Nobody has claimed this yet.
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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