GGreg Kroah-Hartmanrust: init: allow dead_code warnings for Rust >= 1.89.0
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
rust: treewide: switch to our kernel Box type commit 8373147ce4961665c5700016b1c76299e962d077 upstream. Now that we got the kernel Box type in place, convert all existing Box users to make use of it. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Reviewed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20241004154149.93856-13-dakr@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 1 年前 | |
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> | 11 个月前 |