Skip to content

Commit b3bdffc

Browse files
committed
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
1 parent a2f3ccc commit b3bdffc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

macro/src/expand.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ fn expand(ffi: Module, doc: Doc, attrs: OtherAttrs, apis: &[Api], types: &Types)
142142
#[allow(
143143
non_camel_case_types,
144144
non_snake_case,
145+
clippy::extra_unused_type_parameters,
145146
clippy::ptr_as_ptr,
146147
clippy::upper_case_acronyms,
147148
clippy::use_self,

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@
378378
clippy::declare_interior_mutable_const,
379379
clippy::doc_markdown,
380380
clippy::empty_enum,
381+
clippy::extra_unused_type_parameters,
381382
clippy::inherent_to_string,
382383
clippy::items_after_statements,
383384
clippy::large_enum_variant,

0 commit comments

Comments
 (0)