Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve spans for CallArgument constraints #135238

Open
lcnr opened this issue Jan 8, 2025 · 0 comments
Open

improve spans for CallArgument constraints #135238

lcnr opened this issue Jan 8, 2025 · 0 comments
Labels
A-borrow-checker Area: The borrow checker A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. D-imprecise-spans Diagnostics: spans don't point to exactly the erroneous code T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@lcnr
Copy link
Contributor

lcnr commented Jan 8, 2025

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 #133858 (comment)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 8, 2025
@jieyouxu jieyouxu added A-diagnostics Area: Messages for errors, warnings, and lints A-borrow-checker Area: The borrow checker T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. D-imprecise-spans Diagnostics: spans don't point to exactly the erroneous code and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-borrow-checker Area: The borrow checker A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. D-imprecise-spans Diagnostics: spans don't point to exactly the erroneous code T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants