Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • rust
  • uapi
  • lib.rs
Find file BlameHistoryPermalink
  • Miguel Ojeda's avatar
    rust: allow `dead_code` for never constructed bindings · f85bea18
    Miguel Ojeda authored Jul 09, 2024
    
    
    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: default avatarBjörn Roy Baron <bjorn3_gh@protonmail.com>
    Reviewed-by: default avatarFinn Behrens <me@kloenk.dev>
    Tested-by: default avatarBenno Lossin <benno.lossin@proton.me>
    Tested-by: default avatarAndreas Hindborg <a.hindborg@samsung.com>
    Link: https://lore.kernel.org/r/20240709160615.998336-4-ojeda@kernel.org
    
    
    Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
    f85bea18
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7