Re: [PATCH v2] rust: Makefile: bound rustdoc workaround to affected versions

From: Miguel Ojeda

Date: Mon Feb 02 2026 - 11:09:51 EST


On Mon, Feb 2, 2026 at 4:21 PM HeeSu Kim <mlksvender@xxxxxxxxx> wrote:
>
> This bug was fixed in Rust 1.90.0 (rust-lang/rust#144523). Restrict

Normally these references should be full links (i.e. a tag), since we
do not have "autolinking" like GitHub e.g.

Link: https://........ [1]

Then you can use [1] above instead of the parenthesis.

> are affected by the bug, avoiding unnecessary flags on newer compiler

To clarify a bit: avoiding the flags is good, but I think avoiding the
skipping of the checks that the flag does is what is more important
(i.e. if it were just the former advantage, I would say it is not
worth the complexity of the added tests).

> Suggested-by: Gary Guo <gary@xxxxxxxxxxx>

This is very minor and it is fine without a change, but for
completeness: for Suggested-by we generally add a Link: after that
tag, i.e. to lore.kernel.org to the message where Gary suggested it in
this case.

> Fixes: abbf9a449441 ("rust: workaround `rustdoc` target modifiers bug")

I think this is not really a fix anymore, i.e. nothing is broken, and
instead it is more of a feature, as far as I understand: avoiding to
skip the silencing of the checks.

If you added the tag to suggest that the patch should be backported to
stable kernels, then in these cases an explicit Cc: stable@ may be
added, mentioning the versions where this should go, e.g. in this
case:

Cc: stable@xxxxxxxxxxxxxxx # Useful in 6.18.y and later.

(I used "Useful" instead of my usual "Needed" since it is not critical
to backport -- but please correct me if I am wrong).

By the way, I wonder if we would want at least a `rustc-max-version`
function or instead a range-based one for this sort of test. It is not
a blocker for this patch, but we may want to limit other workarounds
too (e.g. the one below this one).

Cc'ing Kbuild since I don't recall we have that for C compilers, so
there may be a reason for that.

Thanks for the patch!

Cheers,
Miguel