docs(ref): Clarify MSRV for lints#17184
Conversation
|
r? @ehuss rustbot has assigned @ehuss. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| 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}`")?; |
There was a problem hiding this comment.
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 😞
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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?