Skip to content

fluent diagnostics can easily overwrite each others' fields/args #142031

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
oli-obk opened this issue Jun 4, 2025 · 1 comment
Open

fluent diagnostics can easily overwrite each others' fields/args #142031

oli-obk opened this issue Jun 4, 2025 · 1 comment
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints D-diagnostic-infra Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Jun 4, 2025

Currently it is neither an error for diagnostic structs to have fields of the same name as subdiagnostics used in that same struct, nor is it a runtime error to specify arg("foo", ...) twice with the same arg name. This caused some confusion in const eval errors where the main error had an instance field/arg and the stack frame that got printed had an instance per frame

Originally posted by @RalfJung in #142015 (comment)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 4, 2025
@oli-obk oli-obk added A-diagnostics Area: Messages for errors, warnings, and lints D-diagnostic-infra Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 4, 2025
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 4, 2025
@xizheyin
Copy link
Contributor

I'd like to try sovling this issue.
@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints D-diagnostic-infra Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself. 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