rust-lang / rust-lang/rust-analyzer

Lower const parameters

Open
#7,434 10 comments 4 reactions 1 assignee View on GitHub

@Veykril is already working on this.

Since Mar 14, 2026.

C-Architecture C-feature E-hard S-actionable
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Currently const params are not lowered at all:
https://github.com/rust-analyzer/rust-analyzer/blob/aa91a0268bae6deda964a9fdfcbdbd2d8ca5802f/crates/hir_def/src/path/lower.rs#L177-L178

These kind of define bodies, so they come with all the goodies(and problems like local items) that other items like functions, statics and consts come with, and just like those they should ideally be lowered lazily.

See corresponding zulip discussion https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/ConstArg.20lowering

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.