Give `resolve_const_param_in_non_trivial_anon_const` more contextual information
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Hm, it would be really nice if we could actually pass a more rich description of the position that's disallowing the const, probably via the
AnonConstKind, so that we don't have to say "here" but instead something like "in array repeat expressions" or "in const generic args" something.
Right now the errors just say "here", but I think we could pass in enough information in the resolver to know what position a non-trivial const arg actually is, which would greatly help discovery of the issue.
Originally posted by @compiler-errors in https://github.com/rust-lang/rust/pull/142157#pullrequestreview-2908579896
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
The issue names the resolver and AnonConstKind but no files or tests; begin by locating resolve_const_param_in_non_trivial_anon_const and the diagnostic that currently says “here.” Done means the diagnostic identifies the relevant position, such as array repeat expressions or const generic arguments, with coverage for the affected cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100