rust-lang / rust-lang/rust-analyzer
Const generic param unknown type
Open
Nobody has claimed this yet.
A-ty
C-bug
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: rust-analyzer 1.90.0-nightly (9748d87 2025-07-21)
rustc version: rustc 1.90.0-nightly (9748d87dc 2025-07-21)
editor or extension: VIM-9.1 coc-rust-analyzer
code snippet to reproduce:
fn foo<const N: usize>() {}
fn main() {
foo::<3usize>();
}
Hover on 3usize output {unknown}
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 and inspect the hover handling for the const argument 3usize. Trace why the hover displays {unknown}; the work is done when the hover reports the const argument's type correctly for this example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100