Skip to content

finish and clean up rustc_const_eval's translatable diagnostics. #113117

Closed

Description

@fee1-dead

For some context see this Zulip topic.

cc @RalfJung.

This issue has a few parts:

In #111677 I added a trait called ReportErrorExt which should be replaced by implementing IntoDiagnostic for newtypes. Another thing would be to investigate if the same can be done for MachineStopType which requires being made into a trait object.

this is an example of using fluent's pattern matching for different error messages. These should be eventually replaced by individual messages with their own identifiers instead of pattern matching.

I'll assign this to myself when I get time. Feel free to claim if this is unassigned.

Activity

  1. added
    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.
    E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
    E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.
    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)
    A-translationArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic
    on Jun 28, 2023
  2. victor-timofei commented on Jun 30, 2023

    @victor-timofei

    @rustbot claim
    I would love to help with this

  3. fee1-dead commented on Jun 30, 2023

    @fee1-dead
    MemberAuthor

    Hi @victor-timofei, thanks for claiming this! Feel free to open a thread on Zulip and ping me if you get stuck.

  4. RalfJung commented on Aug 19, 2023

    @RalfJung
    Member

    this is an example of using fluent's pattern matching for different error messages. These should be eventually replaced by individual messages with their own identifiers instead of pattern matching.

    That link doesn't seem to work here. What are you referring to?

  5. fee1-dead commented on Aug 19, 2023

    @fee1-dead
    MemberAuthor

    See this

  6. CastilloDel commented on Oct 24, 2024

    @CastilloDel
    Contributor

    @rustbot claim

  7. CastilloDel commented on Oct 24, 2024

    @CastilloDel
    Contributor

    @rustbot release-assignment

  8. JayanAXHF commented on Jan 11, 2026

    @JayanAXHF
    Member

    Is this issue still open to contribution?

  9. RalfJung commented on Jan 11, 2026

    @RalfJung
    Member

    Let's wait until rust-lang/compiler-team#959 is resolved before doing anything here.

    The next step then probably is to entirely remove the use of fluent for const-eval errors: we already have our own error types providing the benefits people ascribe to error structs (I think); we should just go back to translating those error types directly into strings IMO.

  10. added 2 commits that reference this issue on Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)A-translationArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticC-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions