rust-clippy/tests/ui/renamed_function_params.stderr
J-ZhengLi 40ec760572 fix doc test failure;
apply review suggestions by @Centri3:
use multi suggestion;
change output message format;
add macro expansion check & tests;
2024-05-07 10:49:02 +08:00

52 lines
1.9 KiB
Text

error: renamed function parameter of trait impl
--> tests/ui/renamed_function_params.rs:22:13
|
LL | fn from(b: B) -> Self {
| ^ help: consider using the default name: `value`
|
= note: `-D clippy::renamed-function-params` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::renamed_function_params)]`
error: renamed function parameter of trait impl
--> tests/ui/renamed_function_params.rs:28:18
|
LL | fn eq(&self, rhs: &Self) -> bool {
| ^^^ help: consider using the default name: `other`
error: renamed function parameter of trait impl
--> tests/ui/renamed_function_params.rs:32:18
|
LL | fn ne(&self, rhs: &Self) -> bool {
| ^^^ help: consider using the default name: `other`
error: renamed function parameter of trait impl
--> tests/ui/renamed_function_params.rs:46:19
|
LL | fn foo(&self, i_dont_wanna_use_your_name: u8) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using the default name: `val`
error: renamed function parameter of trait impl
--> tests/ui/renamed_function_params.rs:54:31
|
LL | fn hash<H: Hasher>(&self, states: &mut H) {
| ^^^^^^ help: consider using the default name: `state`
error: renamed function parameters of trait impl
--> tests/ui/renamed_function_params.rs:58:30
|
LL | fn hash_slice<H: Hasher>(date: &[Self], states: &mut H) {
| ^^^^ ^^^^^^
|
help: consider using the default names
|
LL | fn hash_slice<H: Hasher>(data: &[Self], state: &mut H) {
| ~~~~ ~~~~~
error: renamed function parameter of trait impl
--> tests/ui/renamed_function_params.rs:79:18
|
LL | fn add(self, b: B) -> C {
| ^ help: consider using the default name: `rhs`
error: aborting due to 7 previous errors