Skip to content

Conversation

@Kivooeo
Copy link
Member

@Kivooeo Kivooeo commented Dec 15, 2025

This is implementation of #149932

Now, after MCP was accepted, we can use annotate-snippet as default emitter for errors, that means that we not longer need of previous emitter, so this PR removed previous emitter and makes annotate-snippet new default one both on stable and nightly

(this PR does not remove a code of previous emitter it just removes a Default option of HumanReadableErrorType enum, and keeping only HumanReadableErrorType::AnnotateSnippet as it now uses by default)

@rustbot rustbot added 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Dec 15, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the annotate-snippets-stable branch from e4ad760 to 0298975 Compare December 15, 2025 20:34
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the annotate-snippets-stable branch from 0298975 to 9932c0b Compare December 15, 2025 21:51
@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Dec 15, 2025
Copy link
Member

@Muscraft Muscraft left a comment

Choose a reason for hiding this comment

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

the main problem I faced is that there is no difference on an tests output? and I don't know if there should be any difference, so yeah, maybe I missed something or maybe it should be like this

There really shouldn't be any test difference as annotate-snippets is already used on nightly, which means that all tests are currently ran against it.

View changes since this review

@rust-cloud-vms rust-cloud-vms bot force-pushed the annotate-snippets-stable branch 2 times, most recently from b72b37d to 2e4968b Compare December 16, 2025 11:07
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the annotate-snippets-stable branch from 2e4968b to 549d94b Compare December 16, 2025 11:20
@rust-cloud-vms rust-cloud-vms bot force-pushed the annotate-snippets-stable branch from 549d94b to 84f2854 Compare December 16, 2025 13:24
@Kivooeo Kivooeo changed the title attempt to stabilize annotate snippet Use annotate-snippet as default emitter on stable Dec 16, 2025
@Kivooeo Kivooeo marked this pull request as ready for review December 16, 2025 13:26
@rustbot
Copy link
Collaborator

rustbot commented Dec 16, 2025

rustc_errors::annotate_snippet_emitter_writer was changed

cc @Muscraft

rustc_errors::emitter was changed

cc @Muscraft

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 16, 2025

r? @JonathanBrouwer

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

@Kivooeo
Copy link
Member Author

Kivooeo commented Dec 16, 2025

@Muscraft, feel free to assign yourself on this

I also took a look if documentation should be adjusted for this change and has found nothing related, so it seems like this is the only needed change to close tracking issue

@JonathanBrouwer
Copy link
Contributor

I'm happy to review this, but Muscraft seems like the better option here.
r? @Muscraft
If you don't have capacity to review this or any other reason feel free to assign this back to me :)

@rustbot rustbot assigned Muscraft and unassigned JonathanBrouwer Dec 16, 2025
@Muscraft
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 16, 2025

📌 Commit 84f2854 has been approved by Muscraft

It is now in the queue for this repository.

@bors bors 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 Dec 16, 2025
bors added a commit that referenced this pull request Dec 16, 2025
…uwer

Rollup of 11 pull requests

Successful merges:

 - #147939 (Make `const BorrowMut` require `const Borrow` and make `const Fn` require `const FnMut`)
 - #149734 (Mirror GCC 9.5.0)
 - #149767 (Tidying up tests/ui/issues 33 tests [4/N])
 - #149804 (chore: fix some minor issues in the comments)
 - #149967 (custom `VaList` layout for Hexagon)
 - #150025 (dont create unnecessary `DefId`s under mgca)
 - #150032 (Use annotate-snippet as default emitter on stable)
 - #150033 (Add try_as_dyn and try_as_dyn_mut)
 - #150042 (rustc-dev-guide subtree update)
 - #150063 (Remove deny of manual-let-else)
 - #150064 (std: io: error: Add comment for UEFI unpacked repr use)

Failed merges:

 - #150044 (Avoid unhelpful suggestion when crate name is invalid)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f3fa567 into rust-lang:main Dec 17, 2025
11 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 17, 2025
rust-timer added a commit that referenced this pull request Dec 17, 2025
Rollup merge of #150032 - Kivooeo:annotate-snippets-stable, r=Muscraft

Use annotate-snippet as default emitter on stable

This is implementation of #149932

Now, after MCP was accepted, we can use annotate-snippet as default emitter for errors, that means that we not longer need of previous emitter, so this PR removed previous emitter and makes annotate-snippet new default one both on stable and nightly

(this PR does not remove a code of previous emitter it just removes a `Default` option of `HumanReadableErrorType` enum, and keeping only `HumanReadableErrorType::AnnotateSnippet` as it now uses by default)
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Dec 17, 2025
…uwer

Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#147939 (Make `const BorrowMut` require `const Borrow` and make `const Fn` require `const FnMut`)
 - rust-lang/rust#149734 (Mirror GCC 9.5.0)
 - rust-lang/rust#149767 (Tidying up tests/ui/issues 33 tests [4/N])
 - rust-lang/rust#149804 (chore: fix some minor issues in the comments)
 - rust-lang/rust#149967 (custom `VaList` layout for Hexagon)
 - rust-lang/rust#150025 (dont create unnecessary `DefId`s under mgca)
 - rust-lang/rust#150032 (Use annotate-snippet as default emitter on stable)
 - rust-lang/rust#150033 (Add try_as_dyn and try_as_dyn_mut)
 - rust-lang/rust#150042 (rustc-dev-guide subtree update)
 - rust-lang/rust#150063 (Remove deny of manual-let-else)
 - rust-lang/rust#150064 (std: io: error: Add comment for UEFI unpacked repr use)

Failed merges:

 - rust-lang/rust#150044 (Avoid unhelpful suggestion when crate name is invalid)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc 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