rust-lang / rust-lang/rust-analyzer
Hovering over constant using slice shows incorrect value
Open
@crypto-priest is already working on this.
Since Oct 23, 2025.
A-mir
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.2593-standalone (6b2e677795 2025-08-25)
rustc version: rustc 1.88.0 (6b00bc388 2025-06-23)
editor or extension: VSCode 1.105.0, rust-analyzer 0.3.2593
code snippet to reproduce:
const DATA: &[&[u64]] = &[&[42]];
// 0x1000000000000060
const A: u64 = {
123u64 < 234; // comment out this or the next line, A will be 0
345u64 < 456;
let x = DATA[0][0]; // inline x, A will be 456
x
};
Hover over A (expect 42):
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.
Assessment
This issue has not been assessed yet.