aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2023-02-10 19:21:29 -0800
committerDavid Tolnay <dtolnay@gmail.com>2023-02-10 19:21:36 -0800
commitb3bdffce04a431b509ee2cd7d7c3f5b2dd070e51 (patch)
tree706326cfbd79b7b5eb275af917af26e499595e91
parenta2f3ccc6ed496f5fcede81b6f1f80d6edef5c79d (diff)
downloadcxx-b3bdffce04a431b509ee2cd7d7c3f5b2dd070e51.tar.gz
Ignore extra_unused_type_parameters clippy lint in generated code
error: type parameter goes unused in function definition --> demo/src/main.rs:11:14 | 11 | type MultiBuf; | ^^^^^^^^ | = help: consider removing the parameter = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters = note: `-D clippy::extra-unused-type-parameters` implied by `-D clippy::all` error: type parameter goes unused in function definition --> src/cxx_string.rs:94:15 | 94 | pub fn new<T: Private>() -> Self { | ^^^^^^^^^^^^ | = help: consider removing the parameter = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters error: type parameter goes unused in function definition --> src/extern_type.rs:184:27 | 184 | pub fn verify_extern_type<T: ExternType<Id = Id>, Id>() {} | ^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider removing the parameter = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters = note: `-D clippy::extra-unused-type-parameters` implied by `-D clippy::all` error: type parameter goes unused in function definition --> src/extern_type.rs:187:27 | 187 | pub fn verify_extern_kind<T: ExternType<Kind = Kind>, Kind: self::Kind>() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider removing the parameter = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters error: type parameter goes unused in function definition --> tests/ffi/lib.rs:230:14 | 230 | type Reference<'a>; | ^^^^^^^^^ | = help: consider removing the parameter = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters = note: `-D clippy::extra-unused-type-parameters` implied by `-D clippy::all` error: type parameter goes unused in function definition --> tests/ffi/lib.rs:259:14 | 259 | type R; | ^ | = help: consider removing the parameter = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
-rw-r--r--macro/src/expand.rs1
-rw-r--r--src/lib.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/macro/src/expand.rs b/macro/src/expand.rs
index ba36cb4c..ea5af66a 100644
--- a/macro/src/expand.rs
+++ b/macro/src/expand.rs
@@ -142,6 +142,7 @@ fn expand(ffi: Module, doc: Doc, attrs: OtherAttrs, apis: &[Api], types: &Types)
#[allow(
non_camel_case_types,
non_snake_case,
+ clippy::extra_unused_type_parameters,
clippy::ptr_as_ptr,
clippy::upper_case_acronyms,
clippy::use_self,
diff --git a/src/lib.rs b/src/lib.rs
index 1fb3e2fd..2b20333b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -378,6 +378,7 @@
clippy::declare_interior_mutable_const,
clippy::doc_markdown,
clippy::empty_enum,
+ clippy::extra_unused_type_parameters,
clippy::inherent_to_string,
clippy::items_after_statements,
clippy::large_enum_variant,