improve spans for `CallArgument` constraints
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
that's a quirk of CallArgument constraints. they get their span from the Location of the call terminator; since they don't store the span of the particular argument, it gets lost in diagnostics. that said, it does look like we have the spans of each argument in TypeChecker::check_call_inputs, so they could store that.
Originally posted by @dianne in https://github.com/rust-lang/rust/pull/133858#discussion_r1906130482
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
Start at TypeChecker::check_call_inputs and trace how each argument's span is handled when creating CallArgument constraints. Check how the constraint currently uses the call terminator's Location, then preserve the particular argument span so diagnostics point to that argument. Done means CallArgument constraint diagnostics identify the relevant argument rather than the call terminator.
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
- Mostly clear
- Newbie friendliness
- 45/100