linux/rust
Miguel Ojeda f85bea18f7 rust: allow dead_code for never constructed bindings
Starting with the upcoming Rust 1.80.0 (since upstream commit 35130d7233e9
("Detect pub structs never constructed and unused associated constants
in traits")), the `dead_code` pass detects more cases, which triggers
in the `bindings` crate:

    warning: struct `boot_params` is never constructed
        --> rust/bindings/bindings_generated.rs:10684:12
        |
    10684 | pub struct boot_params {
        |            ^^^^^^^^^^^
        |
        = note: `#[warn(dead_code)]` on by default

As well as in the `uapi` one:

    warning: struct `boot_params` is never constructed
        --> rust/uapi/uapi_generated.rs:10392:12
        |
    10392 | pub struct boot_params {
        |            ^^^^^^^^^^^
        |
        = note: `#[warn(dead_code)]` on by default

These are all expected, since we do not use all the structs in the
bindings that `bindgen` generates from the C headers.

Therefore, allow them.

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Finn Behrens <me@kloenk.dev>
Tested-by: Benno Lossin <benno.lossin@proton.me>
Tested-by: Andreas Hindborg <a.hindborg@samsung.com>
Link: https://lore.kernel.org/r/20240709160615.998336-4-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-07-10 10:28:51 +02:00
..
bindings rust: allow dead_code for never constructed bindings 2024-07-10 10:28:51 +02:00
kernel rust: init: simplify from map_err to inspect_err 2024-07-10 10:28:51 +02:00
macros rust: macros: indent list item in paste!'s docs 2024-07-10 10:28:51 +02:00
uapi rust: allow dead_code for never constructed bindings 2024-07-10 10:28:51 +02:00
.gitignore rust: support running Rust documentation tests as KUnit ones 2023-07-19 09:32:53 -06:00
bindgen_parameters rust: Ignore preserve-most functions 2023-12-13 01:09:55 +01:00
build_error.rs rust: add build_error crate 2022-12-04 01:59:16 +01:00
compiler_builtins.rs rust: upgrade to Rust 1.73.0 2023-10-15 21:25:08 +02:00
exports.c rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c 2023-12-13 01:09:55 +01:00
helpers.c rust: add abstraction for struct page 2024-07-08 23:44:01 +02:00
Makefile kbuild: rust: remove now-unneeded rusttest custom sysroot handling 2024-07-08 22:39:39 +02:00