Skip to content

Give resolve_const_param_in_non_trivial_anon_const more contextual information #142387

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

Open
compiler-errors opened this issue Jun 11, 2025 · 0 comments
Labels
needs-triage This issue may need triage. Remove it if it has been sufficiently triaged.

Comments

@compiler-errors
Copy link
Member

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 #142157 (review)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This issue may need triage. Remove it if it has been sufficiently triaged.
Projects
None yet
Development

No branches or pull requests

2 participants