Skip to content

Commit

Permalink
Ignore spurious unused_unsafe produced by old compilers
Browse files Browse the repository at this point in the history
    warning: unnecessary `unsafe` block
      --> demo/src/main.rs:22:63
       |
    22 |         fn new_blobstore_client() -> UniquePtr<BlobstoreClient>;
       |                                                               ^
       |                                                               |
       |                                                               unnecessary `unsafe` block
       |                                                               because it's nested under this `unsafe` fn
       |
       = note: `#[warn(unused_unsafe)]` on by default
       = note: this `unsafe` block does contain unsafe operations, but those are already allowed in an `unsafe fn`
       = note: `#[allow(unsafe_op_in_unsafe_fn)]` on by default
  • Loading branch information
dtolnay committed Oct 28, 2023
1 parent b5b2fcd commit 4a9c24b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions macro/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ fn expand(ffi: Module, doc: Doc, attrs: OtherAttrs, apis: &[Api], types: &Types)
#[allow(
non_camel_case_types,
non_snake_case,
unused_unsafe, // FIXME: only needed by rustc 1.64 and older
clippy::extra_unused_type_parameters,
clippy::items_after_statements,
clippy::ptr_as_ptr,
Expand Down

0 comments on commit 4a9c24b

Please sign in to comment.