Skip to content

forbid unsafe_code in the library code? #222

@daboross

Description

@daboross

Right now, bitflags contains no unsafe blocks. User code can #![forbid(unsafe_code)]. But it would be nice to have #![forbid(unsafe_code)] here too, to add to the assurance that the library doesn't contain any user-facing unsafe code if the user also uses #![forbid(unsafe_code)]. Would this be reasonable for bitflags?

I think it would have to be #![cfg_attr(not(test), forbid(unsafe_code))] to allow for tests using unsafe, but same difference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions