Skip to content

Commit be1a73b

Browse files
committed
Auto merge of #8061 - vallentin:fix-same-name-method-desc, r=flip1995
Fixed same_name_method description Noticed some odd phrasing, while checking out the new release. changelog: none
2 parents fddef24 + f26821c commit be1a73b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

clippy_lints/src/same_name_method.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::collections::{BTreeMap, BTreeSet};
1111

1212
declare_clippy_lint! {
1313
/// ### What it does
14-
/// It lints if a struct has two method with same time:
14+
/// It lints if a struct has two methods with the same name:
1515
/// one from a trait, another not from trait.
1616
///
1717
/// ### Why is this bad?
@@ -100,7 +100,7 @@ impl<'tcx> LateLintPass<'tcx> for SameNameMethod {
100100
cx,
101101
SAME_NAME_METHOD,
102102
*impl_span,
103-
"method's name is same to an existing method in a trait",
103+
"method's name is the same as an existing method in a trait",
104104
|diag| {
105105
diag.span_note(
106106
trait_method_span,
@@ -139,7 +139,7 @@ impl<'tcx> LateLintPass<'tcx> for SameNameMethod {
139139
cx,
140140
SAME_NAME_METHOD,
141141
impl_span,
142-
"method's name is same to an existing method in a trait",
142+
"method's name is the same as an existing method in a trait",
143143
|diag| {
144144
// TODO should we `span_note` on every trait?
145145
// iterate on trait_spans?

tests/ui/same_name_method.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: method's name is same to an existing method in a trait
1+
error: method's name is the same as an existing method in a trait
22
--> $DIR/same_name_method.rs:20:13
33
|
44
LL | fn foo() {}
@@ -11,7 +11,7 @@ note: existing `foo` defined here
1111
LL | fn foo() {}
1212
| ^^^^^^^^^^^
1313

14-
error: method's name is same to an existing method in a trait
14+
error: method's name is the same as an existing method in a trait
1515
--> $DIR/same_name_method.rs:44:13
1616
|
1717
LL | fn foo() {}
@@ -23,7 +23,7 @@ note: existing `foo` defined here
2323
LL | fn foo() {}
2424
| ^^^^^^^^^^^
2525

26-
error: method's name is same to an existing method in a trait
26+
error: method's name is the same as an existing method in a trait
2727
--> $DIR/same_name_method.rs:58:13
2828
|
2929
LL | fn foo() {}
@@ -35,7 +35,7 @@ note: existing `foo` defined here
3535
LL | impl T1 for S {}
3636
| ^^^^^^^^^^^^^^^^
3737

38-
error: method's name is same to an existing method in a trait
38+
error: method's name is the same as an existing method in a trait
3939
--> $DIR/same_name_method.rs:70:13
4040
|
4141
LL | fn foo() {}
@@ -47,7 +47,7 @@ note: existing `foo` defined here
4747
LL | impl T1 for S {}
4848
| ^^^^^^^^^^^^^^^^
4949

50-
error: method's name is same to an existing method in a trait
50+
error: method's name is the same as an existing method in a trait
5151
--> $DIR/same_name_method.rs:34:13
5252
|
5353
LL | fn clone() {}

0 commit comments

Comments
 (0)