linux/rust
Miguel Ojeda 4c4e62321a rust: proc-macro2: rebuild if the version text changes
The Rust compiler cannot use dependencies built by other versions, e.g.:

    error[E0514]: found crate `proc_macro2` compiled by an incompatible version of rustc
     --> rust/quote/ext.rs:5:5
      |
    5 | use proc_macro2::{TokenStream, TokenTree};
      |     ^^^^^^^^^^^
      |
      = note: the following crate versions were found:
              crate `proc_macro2` compiled by rustc 1.92.0 (ded5c06cf 2025-12-08): ./rust/libproc_macro2.rlib
      = help: please recompile that crate using this compiler (rustc 1.93.0 (254b59607 2026-01-19)) (consider running `cargo clean` first)

Thus trigger a rebuild if the version text changes like we do in other
top-level cases (e.g. see commit aeb0e24abb ("kbuild: rust: replace
proc macros dependency on `core.o` with the version text")).

The build errors for now are hard to trigger, since we do not yet use
the new crates we just introduced (the use cases are coming in the next
merge window), but they can still be seen if e.g. one manually removes
one of the targets, so fix it already.

Fixes: 158a3b7211 ("rust: proc-macro2: enable support in kbuild")
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260122054135.138445-1-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2026-01-23 10:44:27 +01:00
..
bindings USB/Thunderbolt changes for 6.19-rc1 2025-12-06 18:42:12 -08:00
helpers rust: dma: add helpers for architectures without CONFIG_HAS_DMA 2025-12-16 13:20:14 +01:00
kernel rust: num: bounded: add missing comment for always inlined function 2026-01-18 20:40:12 +01:00
macros rust: macros: ignore example with module parameters 2026-01-14 19:52:43 +01:00
pin-init Driver core changes for 6.19-rc1 2025-12-05 21:29:02 -08:00
proc-macro2 rust: proc-macro2: rebuild if the version text changes 2026-01-23 10:44:27 +01:00
quote rust: quote: add README.md 2025-11-24 17:15:43 +01:00
syn rust: syn: add README.md 2025-11-24 17:15:47 +01:00
uapi Char/Misc/IIO/Binder changes for 6.18-rc1 2025-10-04 16:26:32 -07:00
.gitignore rust: support running Rust documentation tests as KUnit ones 2023-07-19 09:32:53 -06:00
.kunitconfig rust: add kunitconfig 2025-03-19 23:22:21 +01:00
bindgen_parameters mm: declare VMA flags by bit 2025-11-29 10:41:08 -08:00
build_error.rs rust: add build_error crate 2022-12-04 01:59:16 +01:00
compiler_builtins.rs ARM: 9441/1: rust: Enable Rust support for ARMv7 2025-03-26 13:31:16 +00:00
exports.c rust: exports: improve grammar in commentary 2024-10-21 17:35:33 +02:00
ffi.rs rust: replace CStr with core::ffi::CStr 2025-10-22 07:47:27 +02:00
Makefile rust: kbuild: Add -fdiagnostics-show-context to bindgen_skip_c_flags 2026-01-06 20:51:21 +01:00