Skip to content

Remove TranslationError#153228

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
JonathanBrouwer:remove_translate_error
Mar 1, 2026
Merged

Remove TranslationError#153228
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
JonathanBrouwer:remove_translate_error

Conversation

@JonathanBrouwer
Copy link
Contributor

@JonathanBrouwer JonathanBrouwer commented Feb 28, 2026

This function is now infallible, since the diagnostic message and presence of variables is already parsed in the msg! or derive(Diagnostic) macro.

In practice, the result of this function was just unwrapped everywhere anyways...

r? @Kivooeo if you feel like reviewing diagnostics PRs again, I have a few more coming :)
(Tho other people are also free to steal these PRs)

@rustbot
Copy link
Collaborator

rustbot commented Feb 28, 2026

rustc_errors::annotate_snippet_emitter_writer was changed

cc @Muscraft

rustc_errors::emitter was changed

cc @Muscraft

rustc_errors::translation was changed

cc @davidtwco, @TaKO8Ki

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 28, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 28, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 14 candidates

@rustbot rustbot assigned Kivooeo and unassigned jieyouxu Feb 28, 2026
@rust-log-analyzer

This comment has been minimized.

@Kivooeo
Copy link
Member

Kivooeo commented Feb 28, 2026

if you feel like reviewing diagnostics PRs again

sure! i'm pretty free now, except i have a flight in four hours, so, i'm not sure if i'll be able to review this tomorrow, but it's very likely i'll be able to do it the day after tomorrow, which is a more realistic timeframe

in the meanwhile, feel free to create those PRs, i'll review them once i get home

@JonathanBrouwer
Copy link
Contributor Author

No hurry with reviewing, a delay of a few days for reviewing is perfectly normal :)

Copy link
Member

@lqd lqd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Kivoo wont make it for a couple days, this LGTM once green.

View changes since this review

@JonathanBrouwer
Copy link
Contributor Author

@bors r=lqd rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 28, 2026

📌 Commit 6e8d9c1 has been approved by lqd

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 28, 2026
rust-bors bot pushed a commit that referenced this pull request Feb 28, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #146989 (Inhibit all-absent-variant optimization for all enum reprs that inhibit layout optimization, not just repr(C).)
 - #151991 (std: sys: pal: uefi: os: Implement split_paths)
 - #152794 (Fix ICE in `try_to_raw_bytes` when array elements have mismatched)
 - #153052 (std random.rs: update link to RTEMS docs)
 - #153054 (docs: note env var influence on `temp_dir` and `env_clear` on Windows)
 - #153061 (cleanup `tests/ui/box`, part 2)
 - #153197 (style: Update doctests for `TryFrom<integer> for bool` and `From<bool> for float`)
 - #153210 (Fix ICE on empty file with -Zquery-dep-graph)
 - #153228 (Remove `TranslationError`)
@rust-bors rust-bors bot merged commit 453fe91 into rust-lang:main Mar 1, 2026
11 checks passed
rust-timer added a commit that referenced this pull request Mar 1, 2026
Rollup merge of #153228 - JonathanBrouwer:remove_translate_error, r=lqd

Remove `TranslationError`

This function is now infallible, since the diagnostic message and presence of variables is already parsed in the `msg!` or `derive(Diagnostic)` macro.

In practice, the result of this function was just unwrapped everywhere anyways...

r? @Kivooeo if you feel like reviewing diagnostics PRs again, I have a few more coming :)
(Tho other people are also free to steal these PRs)
@rustbot rustbot added this to the 1.96.0 milestone Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants