linux-yocto/rust/kernel
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
..
alloc rust: alloc: add missing invariant in Vec::set_len() 2025-06-19 15:32:09 +02:00
block rust: use custom FFI integer types 2025-03-13 13:01:49 +01:00
init rust: init: allow dead_code warnings for Rust >= 1.89.0 2025-07-17 18:37:14 +02:00
list rust: start using the #[expect(...)] attribute 2025-03-13 13:01:42 +01:00
net rust: use custom FFI integer types 2025-03-13 13:01:49 +01:00
sync rust: use custom FFI integer types 2025-03-13 13:01:49 +01:00
alloc.rs rust: alloc: update module comment of alloc.rs 2025-03-13 13:01:47 +01:00
block.rs rust: block: introduce kernel::block::mq module 2024-06-14 07:45:04 -06:00
build_assert.rs
device.rs rust: device: change the from_raw() function 2024-10-03 13:54:48 +02:00
error.rs rust: error: add missing newline to pr_warn! calls 2025-03-22 12:54:26 -07:00
firmware.rs rust: firmware: Use ffi::c_char type in FwFunc 2025-05-02 07:59:06 +02:00
init.rs rust: init: add missing newline to pr_info! calls 2025-03-22 12:54:26 -07:00
ioctl.rs rust: start using the #[expect(...)] attribute 2025-03-13 13:01:42 +01:00
kunit.rs rust: kunit: use C-string literals to clean warning 2024-10-01 23:46:42 +02:00
lib.rs rust: remove leftover mentions of the alloc crate 2025-03-22 12:54:23 -07:00
list.rs rust: allow Rust 1.87.0's clippy::ptr_eq lint 2025-05-18 08:24:57 +02:00
net.rs
page.rs rust: add abstraction for struct page 2024-07-08 23:44:01 +02:00
prelude.rs rust: alloc: add Vec to prelude 2025-03-13 13:01:46 +01:00
print.rs rust: fix signature of rust_fmt_argument 2025-04-10 14:39:20 +02:00
rbtree.rs rust: treewide: switch to our kernel Box type 2025-03-13 13:01:44 +01:00
sizes.rs rust: sizes: add commonly used constants 2024-08-30 10:27:34 +01:00
static_assert.rs
std_vendor.rs rust: start using the #[expect(...)] attribute 2025-03-13 13:01:42 +01:00
str.rs rust: clean Rust 1.88.0's clippy::uninlined_format_args lint 2025-05-18 08:24:57 +02:00
sync.rs rust: lockdep: Remove support for dynamically allocated LockClassKeys 2025-03-22 12:54:22 -07:00
task.rs rust: use custom FFI integer types 2025-03-13 13:01:49 +01:00
time.rs rust: use custom FFI integer types 2025-03-13 13:01:49 +01:00
types.rs rust: use custom FFI integer types 2025-03-13 13:01:49 +01:00
uaccess.rs rust: map long to isize and char to u8 2025-03-13 13:02:13 +01:00
workqueue.rs rust: treewide: switch to our kernel Box type 2025-03-13 13:01:44 +01:00