Skip to content

Commit 1a46dc0

Browse files
committed
Auto merge of rust-lang#10138 - smoelius:unused_self-typo, r=xFrednet
Fix typo in `unused_self` diagnostic message changelog: Msg: [`unused_self`]: The message now correctly uses *an* [rust-lang#10138](rust-lang/rust-clippy#10138) <!-- changelog_checked -->
2 parents 653f5d9 + da7c99b commit 1a46dc0

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

clippy_lints/src/unused_self.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedSelf {
7272
self_param.span,
7373
"unused `self` argument",
7474
None,
75-
"consider refactoring to a associated function",
75+
"consider refactoring to an associated function",
7676
);
7777
}
7878
}

tests/ui/unused_self.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: unused `self` argument
44
LL | fn unused_self_move(self) {}
55
| ^^^^
66
|
7-
= help: consider refactoring to a associated function
7+
= help: consider refactoring to an associated function
88
= note: `-D clippy::unused-self` implied by `-D warnings`
99

1010
error: unused `self` argument
@@ -13,63 +13,63 @@ error: unused `self` argument
1313
LL | fn unused_self_ref(&self) {}
1414
| ^^^^^
1515
|
16-
= help: consider refactoring to a associated function
16+
= help: consider refactoring to an associated function
1717

1818
error: unused `self` argument
1919
--> $DIR/unused_self.rs:13:32
2020
|
2121
LL | fn unused_self_mut_ref(&mut self) {}
2222
| ^^^^^^^^^
2323
|
24-
= help: consider refactoring to a associated function
24+
= help: consider refactoring to an associated function
2525

2626
error: unused `self` argument
2727
--> $DIR/unused_self.rs:14:32
2828
|
2929
LL | fn unused_self_pin_ref(self: Pin<&Self>) {}
3030
| ^^^^
3131
|
32-
= help: consider refactoring to a associated function
32+
= help: consider refactoring to an associated function
3333

3434
error: unused `self` argument
3535
--> $DIR/unused_self.rs:15:36
3636
|
3737
LL | fn unused_self_pin_mut_ref(self: Pin<&mut Self>) {}
3838
| ^^^^
3939
|
40-
= help: consider refactoring to a associated function
40+
= help: consider refactoring to an associated function
4141

4242
error: unused `self` argument
4343
--> $DIR/unused_self.rs:16:35
4444
|
4545
LL | fn unused_self_pin_nested(self: Pin<Arc<Self>>) {}
4646
| ^^^^
4747
|
48-
= help: consider refactoring to a associated function
48+
= help: consider refactoring to an associated function
4949

5050
error: unused `self` argument
5151
--> $DIR/unused_self.rs:17:28
5252
|
5353
LL | fn unused_self_box(self: Box<Self>) {}
5454
| ^^^^
5555
|
56-
= help: consider refactoring to a associated function
56+
= help: consider refactoring to an associated function
5757

5858
error: unused `self` argument
5959
--> $DIR/unused_self.rs:18:40
6060
|
6161
LL | fn unused_with_other_used_args(&self, x: u8, y: u8) -> u8 {
6262
| ^^^^^
6363
|
64-
= help: consider refactoring to a associated function
64+
= help: consider refactoring to an associated function
6565

6666
error: unused `self` argument
6767
--> $DIR/unused_self.rs:21:37
6868
|
6969
LL | fn unused_self_class_method(&self) {
7070
| ^^^^^
7171
|
72-
= help: consider refactoring to a associated function
72+
= help: consider refactoring to an associated function
7373

7474
error: aborting due to 9 previous errors
7575

0 commit comments

Comments
 (0)