linux-yocto/rust
Miguel Ojeda 5d2d34f367 rust: init: allow dead_code warnings for Rust >= 1.89.0
Starting with Rust 1.89.0 (expected 2025-08-07), the Rust compiler
may warn:

    error: trait `MustNotImplDrop` is never used
       --> rust/kernel/init/macros.rs:927:15
        |
    927 |         trait MustNotImplDrop {}
        |               ^^^^^^^^^^^^^^^
        |
       ::: rust/kernel/sync/arc.rs:133:1
        |
    133 | #[pin_data]
        | ----------- in this procedural macro expansion
        |
        = note: `-D dead-code` implied by `-D warnings`
        = help: to override `-D warnings` add `#[allow(dead_code)]`
        = note: this error originates in the macro `$crate::__pin_data`
                which comes from the expansion of the attribute macro
                `pin_data` (in Nightly builds, run with
                -Z macro-backtrace for more info)

Thus `allow` it to clean it up.

This does not happen in mainline nor 6.15.y, because there the macro was
moved out of the `kernel` crate, and `dead_code` warnings are not
emitted if the macro is foreign to the crate. Thus this patch is
directly sent to stable and intended for 6.12.y only.

Similarly, it is not needed in previous LTSs, because there the Rust
version is pinned.

Acked-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-17 18:37:14 +02:00
..
bindings rust: clean Rust 1.88.0's unnecessary_transmutes lint 2025-05-18 08:24:51 +02:00
helpers rust: alloc: implement KVmalloc allocator 2025-03-13 13:01:44 +01:00
kernel rust: init: allow dead_code warnings for Rust >= 1.89.0 2025-07-17 18:37:14 +02:00
macros rust: module: place cleanup_module() in .exit.text section 2025-07-06 11:01:33 +02:00
uapi rust: clean Rust 1.88.0's unnecessary_transmutes lint 2025-05-18 08:24:51 +02:00
.gitignore rust: support running Rust documentation tests as KUnit ones 2023-07-19 09:32:53 -06:00
bindgen_parameters rust: map __kernel_size_t and friends also to usize/isize 2025-03-13 13:01:48 +01:00
build_error.rs
compiler_builtins.rs rust: add intrinsics to fix -Os builds 2024-08-10 00:05:10 +02:00
exports.c kbuild: rust: remove the alloc crate and GlobalAlloc 2025-03-13 13:01:47 +01:00
ffi.rs rust: map long to isize and char to u8 2025-03-13 13:02:13 +01:00
Makefile rust: arm: fix unknown (to Clang) argument '-mno-fdpic' 2025-07-06 11:01:33 +02:00