RS.CLIPPY.EXTRA_UNUSED_TYPE_PARAMETERS
Unused type parameters in function definitions
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: extra_unused_type_parameters. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for type parameters in generics that are never used anywhere else.
Why is this bad?
Functions cannot infer the value of unused type parameters; therefore, calling them requires using a turbofish, which serves no purpose but to satisfy the compiler.
Example
fn unused_ty<T>(x: u8) {
// ..
}
Use instead:
fn no_unused_ty(x: u8) {
// ..
}