Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable unsafe_ops_in_unsafe_fn lint in all workspaces #3044

Merged

Commits on Nov 14, 2022

  1. chore: warn(unsafe_op_in_unsafe_fn) for {deno_webgpu,player,wgpu-ty…

    …pes}`
    
    This commit bundles all of the trivial cases for enabling this lint, where no action is required
    beyond adding the lint.
    ErichDonGubler committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    511c71f View commit details
    Browse the repository at this point in the history
  2. chore: naively set warn(unsafe_op_in_unsafe_fn) for wgpu

    Do the simplest mechanical work necessary to enable and satisfy this lint; only put down `unsafe`
    blocks, don't try to inspect for correctness or anything else.
    ErichDonGubler committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    7c128a7 View commit details
    Browse the repository at this point in the history
  3. chore: naively set warn(unsafe_op_in_unsafe_fn) in wgpu-core

    Do the simplest mechanical work necessary to enable and satisfy this lint; only put down `unsafe`
    blocks, don't try to inspect for correctness or anything else.
    
    N.B.: that there _are_ some adjustments identified that could be made here, like breaking multiple
    individual `unsafe` operations into their `unsafe` spans. This is left for a follow-up commit.
    ErichDonGubler committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    d799498 View commit details
    Browse the repository at this point in the history
  4. chore: naively set warn(unsafe_op_in_unsafe_fn) in wgpu-hal

    Do the simplest mechanical work necessary to enable and satisfy this lint; only put down `unsafe`
    blocks, don't try to inspect for correctness or anything else.
    
    N.B.: that there _are_ some adjustments identified that could be made here, like breaking multiple
    individual `unsafe` operations into their `unsafe` spans. This is left for a follow-up commit.
    ErichDonGubler committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    02cdc85 View commit details
    Browse the repository at this point in the history
  5. chore: separate new unsafe ops into blocks

    Unsafe operations can be exhausting to validate by themselves. Therefore, it's often interesting to
    separate these out so we can justify each individual operation, and let a human reader accumulate
    and drop supporting safety context in the smallest increments necessary. To that end, this commit
    can pave the way for future work where we may do something like enable
    [`clippy::undocumented_unsafe_blocks`], which calls out `unsafe` blocks that do not have a `SAFETY`
    comment immediately above them.
    
    This commit only separates the operations in `unsafe` blocks I added in this same PR; I'm
    deliberately leaving existing `unsafe` blocks alone, ATM.
    
    [`clippy::undocumented_unsafe_blocks`]: https://rust-lang.github.io/rust-clippy/stable/index.html#undocumented_unsafe_blocks
    ErichDonGubler committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    f56a393 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f411fa7 View commit details
    Browse the repository at this point in the history