diff options
author | Benno Lossin <benno.lossin@proton.me> | 2025-04-14 23:00:03 +0300 |
---|---|---|
committer | Benno Lossin <benno.lossin@proton.me> | 2025-04-22 00:18:42 +0300 |
commit | 31005209b88c83adc4b4ef63fbc02867cddb2689 (patch) | |
tree | 8ad1266f8a69a35fd162b00c00afc2983f12d96b /scripts/generate_rust_analyzer.py | |
parent | 2cce50f5ab83d01cc3aafa3fb55cba97584aee51 (diff) | |
download | linux-31005209b88c83adc4b4ef63fbc02867cddb2689.tar.xz |
rust: pin-init: internal: skip rustfmt formatting of kernel-only module
The `quote` module only is available in the kernel and thus running
`cargo fmt` or `rustfmt internal/src/lib.rs` in the user-space
repository [1] results in:
error: couldn't read `~/pin-init/internal/src/../../../macros/quote.rs`: No such file or directory (os error 2)
--> ~/pin-init/internal/src/lib.rs:25:1
|
25 | mod quote;
| ^^^^^^^^^^
Error writing files: failed to resolve mod `quote`: ~/pin-init/internal/src/../../../macros/quote.rs does not exist
Thus mark it with `rustfmt::skip` when compiling without kernel support.
Link: https://github.com/Rust-for-Linux/pin-init [1]
Link: https://github.com/Rust-for-Linux/pin-init/pull/33/commits/a6caf1945e51da38761aab4dffa56e63e2baa218
Link: https://lore.kernel.org/all/20250414195928.129040-2-benno.lossin@proton.me
Reviewed-by: Christian Schrefl <chrisi.schrefl@gmail.com>
Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions