Skip to content

Give resolve_const_param_in_non_trivial_anon_const more contextual information #142387

@compiler-errors

Description

@compiler-errors

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions