-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve help for
extra_unused_type_parameters
- Loading branch information
1 parent
f5336ff
commit 43fdcf5
Showing
3 changed files
with
130 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,59 @@ | ||
error: type parameter goes unused in function definition | ||
--> $DIR/extra_unused_type_parameters.rs:4:14 | ||
--> $DIR/extra_unused_type_parameters.rs:4:13 | ||
| | ||
LL | fn unused_ty<T>(x: u8) {} | ||
| ^ | ||
| ^^^ | ||
| | ||
= help: consider removing the parameter | ||
= note: `-D clippy::extra-unused-type-parameters` implied by `-D warnings` | ||
|
||
error: type parameter goes unused in function definition | ||
--> $DIR/extra_unused_type_parameters.rs:6:17 | ||
error: type parameters go unused in function definition | ||
--> $DIR/extra_unused_type_parameters.rs:6:16 | ||
| | ||
LL | fn unused_multi<T, U>(x: u8) {} | ||
| ^ | ||
| ^^^^^^ | ||
| | ||
= help: consider removing the parameters | ||
|
||
error: type parameter goes unused in function definition | ||
--> $DIR/extra_unused_type_parameters.rs:6:20 | ||
--> $DIR/extra_unused_type_parameters.rs:8:23 | ||
| | ||
LL | fn unused_multi<T, U>(x: u8) {} | ||
| ^ | ||
LL | fn unused_with_lt<'a, T>(x: &'a u8) {} | ||
| ^ | ||
| | ||
= help: consider removing the parameter | ||
|
||
error: type parameter goes unused in function definition | ||
--> $DIR/extra_unused_type_parameters.rs:16:22 | ||
--> $DIR/extra_unused_type_parameters.rs:18:19 | ||
| | ||
LL | fn unused_bounded<T: Default, U>(x: U) {} | ||
| ^^^^^^^^^^^ | ||
| | ||
LL | fn unused_with_bound<T: Default>(x: u8) {} | ||
| ^ | ||
= help: consider removing the parameter | ||
|
||
error: type parameter goes unused in function definition | ||
--> $DIR/extra_unused_type_parameters.rs:39:23 | ||
--> $DIR/extra_unused_type_parameters.rs:20:24 | ||
| | ||
LL | fn unused_where_clause<T, U>(x: U) | ||
| ^^ | ||
| | ||
= help: consider removing the parameter | ||
|
||
error: type parameters go unused in function definition | ||
--> $DIR/extra_unused_type_parameters.rs:26:16 | ||
| | ||
LL | fn some_unused<A, B, C, D: Iterator<Item = (B, C)>, E>(b: B, c: C) {} | ||
| ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ | ||
| | ||
= help: consider removing the parameters | ||
|
||
error: type parameter goes unused in function definition | ||
--> $DIR/extra_unused_type_parameters.rs:49:22 | ||
| | ||
LL | fn unused_ty_impl<T>(&self) {} | ||
| ^ | ||
| ^^^ | ||
| | ||
= help: consider removing the parameter | ||
|
||
error: aborting due to 5 previous errors | ||
error: aborting due to 7 previous errors | ||
|