Skip to content

Conversation

@bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Jan 9, 2026

This completes the transition to annotate-snippets and cuts 3600 lines of code.

@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2026

rustc_errors::emitter was changed

cc @Muscraft

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

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 Jan 9, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2026

r? @nnethercote

rustbot has assigned @nnethercote.
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

@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the remove_old_error_emitter branch from 2060332 to 1b27206 Compare January 11, 2026 18:40
@rust-log-analyzer

This comment has been minimized.

This completes the transition to annotate-snippets
@bjorn3 bjorn3 force-pushed the remove_old_error_emitter branch from 1b27206 to 4f4df28 Compare January 11, 2026 18:54
@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2026

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@rustbot rustbot added the T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. label Jan 11, 2026
) -> Result<ParseSourceInfo, ()> {
use rustc_errors::DiagCtxt;
use rustc_errors::emitter::HumanEmitter;
use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitter;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an obnoxiously long module name. The _writer suffix seems entirely unnecessary, given that it defines a type named AnnotateSnipperEmitter.

(Pre-existing, so no need to do anything here, I'm just noticing it.)

@nnethercote
Copy link
Contributor

The code changes look good, r=me on those. It's a big change but it's already covered by rust-lang/compiler-team#947, so we are good on that front. The only question is whether you want to merge it immediately or wait a bit, as per this comment. So I'll let you trigger the final merge, @bjorn3.

@nnethercote nnethercote added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 11, 2026
@bjorn3
Copy link
Member Author

bjorn3 commented Jan 12, 2026

What do you think @Muscraft? Do you think it is likely we might need to switch back temporarily in the near future?

@Muscraft
Copy link
Member

Do you think it is likely we might need to switch back temporarily in the near future?

Given that there has only been one issue (that I am aware of), combined with the fact that a lot of the internals of annotate-snippets mirror those of the old emitter, I don't think that it would be very likely that we would need to switch back. With that being said, the new emitter has only been running on nightly versions of Rust, and something could pop up when it hits stable in Rust 1.94.0 (2026-03-05 IIRC). I could go either way on whether to remove the old emitter now or later, and I would be comfortable with either choice.

@bjorn3
Copy link
Member Author

bjorn3 commented Jan 14, 2026

How about we merge this PR right after beta forks? That way there is one version of rustc where the new emitter is used, but the old emitter still present in case we need to revert back to it on the beta branch. And it should give roughly six weeks to backport bugfixes to the new emitter on the beta branch if issues pop up immediately after the new emitter hits stable.

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-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants