-
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
83c2a48
commit e12dbd7
Showing
3 changed files
with
89 additions
and
24 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,43 @@ | ||
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) {} | ||
| ^ | ||
|
||
error: type parameter goes unused in function definition | ||
--> $DIR/extra_unused_type_parameters.rs:6:20 | ||
| ^^^^^^ | ||
| | ||
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:16:22 | ||
--> $DIR/extra_unused_type_parameters.rs:16:21 | ||
| | ||
LL | fn unused_with_bound<T: Default>(x: u8) {} | ||
| ^ | ||
| ^^^^^^^^^^^^ | ||
| | ||
= help: consider removing the parameter | ||
|
||
error: type parameters go unused in function definition | ||
--> $DIR/extra_unused_type_parameters.rs:18: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:39:23 | ||
--> $DIR/extra_unused_type_parameters.rs:41:22 | ||
| | ||
LL | fn unused_ty_impl<T>(&self) {} | ||
| ^ | ||
| ^^^ | ||
| | ||
= help: consider removing the parameter | ||
|
||
error: aborting due to 5 previous errors | ||
|