Skip to content

Commit

Permalink
Suppress items_after_statements pedantic clippy lint inside generated…
Browse files Browse the repository at this point in the history
… code

    warning: adding items after statements is confusing, since items exist from the start of the scope
      --> demo/src/main.rs:15:12
       |
    15 |         fn next_chunk(buf: &mut MultiBuf) -> &[u8];
       |            ^^^^^^^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements
       = note: `-W clippy::items-after-statements` implied by `-W clippy::pedantic`
  • Loading branch information
dtolnay committed Jul 6, 2023
1 parent b80975f commit bcc8d8c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::items_after_statements, clippy::uninlined_format_args)]
#![allow(clippy::uninlined_format_args)]

#[cxx::bridge(namespace = "org::blobstore")]
mod ffi {
Expand Down
1 change: 1 addition & 0 deletions macro/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ fn expand(ffi: Module, doc: Doc, attrs: OtherAttrs, apis: &[Api], types: &Types)
non_camel_case_types,
non_snake_case,
clippy::extra_unused_type_parameters,
clippy::items_after_statements,
clippy::ptr_as_ptr,
clippy::upper_case_acronyms,
clippy::use_self,
Expand Down
1 change: 0 additions & 1 deletion tests/ffi/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![allow(
clippy::boxed_local,
clippy::derive_partial_eq_without_eq,
clippy::items_after_statements,
clippy::just_underscores_and_digits,
clippy::missing_errors_doc,
clippy::missing_safety_doc,
Expand Down

0 comments on commit bcc8d8c

Please sign in to comment.