Skip to content

docs(diag): Provide jumping off points for writing diagnostics and passes#17090

Merged
epage merged 1 commit into
rust-lang:masterfrom
epage:instructions
Jun 11, 2026
Merged

docs(diag): Provide jumping off points for writing diagnostics and passes#17090
epage merged 1 commit into
rust-lang:masterfrom
epage:instructions

Conversation

@epage

@epage epage commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

This delegates a lot of implementation details to the parse pass API, the parse pass as an example, existing rules as examples, and tests for style enforcement.

This is part of #12235

How to test and review this PR?

I expect we'll iterate on this as we get more contributions

…sses

This delegates a lot of implementation details to the parse pass API, the parse
pass as an example, existing rules as examples, and tests for style
enforcement.

This is part of rust-lang#12235
@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 10, 2026
@rustbot

rustbot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

r? @ehuss

rustbot has assigned @ehuss.
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: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, weihanglo

Comment on lines +33 to +38
//! - Try to keep the report succinct while ensuring a beginner can understand what is wrong and how to fix.
//! It is a difficult balance to hit; err on the side of providing extra information.
//! - Messages should generally be a phrase, starting with a lowercase letter.
//! If multiple sentences are needed, consider if a [message][cargo_util_terminal::report::Message] or sub-diagnostic would be more
//! appropriate.
//! - Only the first lint for a package should emit the [`lint::Lint::emitted_source`]

@weihanglo weihanglo Jun 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Each of them we can point to existing lints as examples I guess? Anything we can iterate on the doc as we go.

View changes since the review

Comment thread src/doc/contrib/src/implementation/console.md Outdated

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Feel free to merge it when the wrong link gets fixed.

View changes since this review

@epage epage enabled auto-merge June 11, 2026 03:48
@epage epage mentioned this pull request Jun 11, 2026
20 tasks
@epage epage added this pull request to the merge queue Jun 11, 2026
Merged via the queue into rust-lang:master with commit d96bca1 Jun 11, 2026
29 checks passed
@epage epage deleted the instructions branch June 11, 2026 05:21
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 11, 2026
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 11, 2026
Update cargo submodule

11 commits in 0b1123a48825309b697312b44fdb64b3df00c958..fe63976b245b8a649c3f2949bf89fdc307bfbae4
2026-06-01 21:20:28 +0000 to 2026-06-11 09:17:57 +0000
- refactor: reduce use `Summary::{as_summary,into_summary}` (rust-lang/cargo#17092)
- docs(diag): Provide jumping off points for writing diagnostics and passes (rust-lang/cargo#17090)
- refactor(source): drop `Source::is_yanked` (rust-lang/cargo#17091)
- refactor(resolver): move yank policy to resolver layer  (rust-lang/cargo#17083)
- fix(publish): avoid false deadlock when to_confirm is non-empty (rust-lang/cargo#17071)
- doc(guide): use fresh actions/checkout version in GH actions examples (rust-lang/cargo#17087)
- fix: strip CR from `cargo:token-from-stdout` (rust-lang/cargo#17081)
- test: show some odd `--precise` cases (rust-lang/cargo#17082)
- chore(deps): update rust crate gix to 0.84.0 (rust-lang/cargo#17063)
- refactor: drop `yanked_whitelist` from source loading (rust-lang/cargo#17014)
- chore(deps): update msrv to v1.96 (rust-lang/cargo#17041)
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 11, 2026
Update cargo submodule

11 commits in 0b1123a48825309b697312b44fdb64b3df00c958..fe63976b245b8a649c3f2949bf89fdc307bfbae4
2026-06-01 21:20:28 +0000 to 2026-06-11 09:17:57 +0000
- refactor: reduce use `Summary::{as_summary,into_summary}` (rust-lang/cargo#17092)
- docs(diag): Provide jumping off points for writing diagnostics and passes (rust-lang/cargo#17090)
- refactor(source): drop `Source::is_yanked` (rust-lang/cargo#17091)
- refactor(resolver): move yank policy to resolver layer  (rust-lang/cargo#17083)
- fix(publish): avoid false deadlock when to_confirm is non-empty (rust-lang/cargo#17071)
- doc(guide): use fresh actions/checkout version in GH actions examples (rust-lang/cargo#17087)
- fix: strip CR from `cargo:token-from-stdout` (rust-lang/cargo#17081)
- test: show some odd `--precise` cases (rust-lang/cargo#17082)
- chore(deps): update rust crate gix to 0.84.0 (rust-lang/cargo#17063)
- refactor: drop `yanked_whitelist` from source loading (rust-lang/cargo#17014)
- chore(deps): update msrv to v1.96 (rust-lang/cargo#17041)
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 11, 2026
Update cargo submodule

11 commits in 0b1123a48825309b697312b44fdb64b3df00c958..fe63976b245b8a649c3f2949bf89fdc307bfbae4
2026-06-01 21:20:28 +0000 to 2026-06-11 09:17:57 +0000
- refactor: reduce use `Summary::{as_summary,into_summary}` (rust-lang/cargo#17092)
- docs(diag): Provide jumping off points for writing diagnostics and passes (rust-lang/cargo#17090)
- refactor(source): drop `Source::is_yanked` (rust-lang/cargo#17091)
- refactor(resolver): move yank policy to resolver layer  (rust-lang/cargo#17083)
- fix(publish): avoid false deadlock when to_confirm is non-empty (rust-lang/cargo#17071)
- doc(guide): use fresh actions/checkout version in GH actions examples (rust-lang/cargo#17087)
- fix: strip CR from `cargo:token-from-stdout` (rust-lang/cargo#17081)
- test: show some odd `--precise` cases (rust-lang/cargo#17082)
- chore(deps): update rust crate gix to 0.84.0 (rust-lang/cargo#17063)
- refactor: drop `yanked_whitelist` from source loading (rust-lang/cargo#17014)
- chore(deps): update msrv to v1.96 (rust-lang/cargo#17041)
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Jun 11, 2026
Update cargo submodule

11 commits in 0b1123a48825309b697312b44fdb64b3df00c958..fe63976b245b8a649c3f2949bf89fdc307bfbae4
2026-06-01 21:20:28 +0000 to 2026-06-11 09:17:57 +0000
- refactor: reduce use `Summary::{as_summary,into_summary}` (rust-lang/cargo#17092)
- docs(diag): Provide jumping off points for writing diagnostics and passes (rust-lang/cargo#17090)
- refactor(source): drop `Source::is_yanked` (rust-lang/cargo#17091)
- refactor(resolver): move yank policy to resolver layer  (rust-lang/cargo#17083)
- fix(publish): avoid false deadlock when to_confirm is non-empty (rust-lang/cargo#17071)
- doc(guide): use fresh actions/checkout version in GH actions examples (rust-lang/cargo#17087)
- fix: strip CR from `cargo:token-from-stdout` (rust-lang/cargo#17081)
- test: show some odd `--precise` cases (rust-lang/cargo#17082)
- chore(deps): update rust crate gix to 0.84.0 (rust-lang/cargo#17063)
- refactor: drop `yanked_whitelist` from source loading (rust-lang/cargo#17014)
- chore(deps): update msrv to v1.96 (rust-lang/cargo#17041)
@rustbot rustbot added this to the 1.98.0 milestone Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-documenting-cargo-itself Area: Cargo's documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants