Re: [PATCH 09/18] rust: proc-macro2: enable support in kbuild
From: Alice Ryhl
Date: Mon Nov 10 2025 - 08:36:26 EST
On Mon, Nov 10, 2025 at 02:28:06PM +0100, Miguel Ojeda wrote:
> On Mon, Nov 10, 2025 at 2:10 PM Gary Guo <gary@xxxxxxxxxxx> wrote:
> >
> > So I think the implementation here is sensible. I believe Miguel's
> > patch is also pretty much replicating the logic in proc-macro2's
> > build.rs.
>
> Exactly, I was essentially following what upstream does for stable compilers.
>
> (More generally, even if a feature may work, if upstream doesn't
> usually test "older nightlies", then I wonder if we should enable such
> combinations/setups anyway, unless we need them for a particular
> reason).
If these features change the public API exposed by proc-macro2, then it
seems better to always disable it to prevent situations where you
accidentally wrote code that does not work on our minimum rustc version.
(Of course, this is a polyfill and no API is changed, then that's a
different situation and then this LGTM.)
Alice