Skip to content

Bindgen generates unnecessary unsafe blocks #3355

@wintermelons

Description

@wintermelons

After a502187, ::std::mem::transmute(val) are changed to val as _, but the outer unsafe blocks are still generated, resulting in build errors like

error: unnecessary `unsafe` block
     --> ../../src/starnix/lib/linux_uapi/src/x86_64.rs:12344:9
      |
12344 |         unsafe {
      |         ^^^^^^ unnecessary `unsafe` block

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions