Skip to content

docs(ref): Clarify MSRV for lints#17184

Merged
weihanglo merged 1 commit into
rust-lang:masterfrom
epage:docs
Jul 8, 2026
Merged

docs(ref): Clarify MSRV for lints#17184
weihanglo merged 1 commit into
rust-lang:masterfrom
epage:docs

Conversation

@epage

@epage epage commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

This is attempting to reduce a confusion reported at #t-cargo > Reviewing the linting system @ 💬

How to test and review this PR?

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation A-infrastructure Area: infrastructure around the cargo repo, ci, releases, etc. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 6, 2026
@rustbot

rustbot commented Jul 6, 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

writeln!(buf, "- Level: `{}`", lint.primary_group.default_level)?;
if let Some(msrv) = &lint.msrv {
writeln!(buf, "- MSRV: `{msrv}`")?;
writeln!(buf, "- Minimal [`package.rust-version`]: `{msrv}`")?;

@weihanglo weihanglo Jul 8, 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.

Thanks! This is definitely better, though still not clear in terms of the interaction between the active toolchain and package.rust-version. Maybe it doesn't need to be explained at all? However, if you look like group and lint level, they do have some excellent documentation even those are pretty well-known concepts.

BTW, I personally feel it is now unfortunately verbose 😞

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you have an alternative?

What I'm trying to address by having this listed in the first place is for when someone asks the question "why is a lint not showing up?".

We already use MSRV in other places in the docs.

I'm not quite seeing a good place to give a more verbose explanation like rustc's.

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.

We already use MSRV in other places in the docs.

You meant something like "MSRV: Requires 1.64+"? I think that may be the source of confusion, because some of them are active toolchain IIRC. And this one is configured MSRV.

That said, I have only a worse alternative: have a footnote on every "Minimal package.rust-version" / "MSRV" and explain what that is.

I am actually fine with the current one. Let's merge it first then.

@weihanglo weihanglo added this pull request to the merge queue Jul 8, 2026
Merged via the queue into rust-lang:master with commit 7dd8d06 Jul 8, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 8, 2026
@epage epage deleted the docs branch July 9, 2026 01:06
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 A-infrastructure Area: infrastructure around the cargo repo, ci, releases, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants