about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvallentin <mail@vallentin.dev>2021-12-02 18:07:28 +0100
committervallentin <mail@vallentin.dev>2021-12-02 18:25:09 +0100
commitf26821c96948dbb2c6a4a8f17ba4b0634d3d2034 (patch)
treedef85f3e9cc815f799116e266b175b7f99258b37
parent392b0c5c25ddbd36e4dc480afcf70ed01dce352d (diff)
downloadrust-f26821c96948dbb2c6a4a8f17ba4b0634d3d2034.tar.gz
rust-f26821c96948dbb2c6a4a8f17ba4b0634d3d2034.zip
Fixed same_name_method description
-rw-r--r--clippy_lints/src/same_name_method.rs6
-rw-r--r--tests/ui/same_name_method.stderr10
2 files changed, 8 insertions, 8 deletions
diff --git a/clippy_lints/src/same_name_method.rs b/clippy_lints/src/same_name_method.rs
index 3f38d12fb55..1bbaa104e60 100644
--- a/clippy_lints/src/same_name_method.rs
+++ b/clippy_lints/src/same_name_method.rs
@@ -11,7 +11,7 @@ use std::collections::{BTreeMap, BTreeSet};
 
 declare_clippy_lint! {
     /// ### What it does
-    /// It lints if a struct has two method with same time:
+    /// It lints if a struct has two methods with the same name:
     /// one from a trait, another not from trait.
     ///
     /// ### Why is this bad?
@@ -100,7 +100,7 @@ impl<'tcx> LateLintPass<'tcx> for SameNameMethod {
                                         cx,
                                         SAME_NAME_METHOD,
                                         *impl_span,
-                                        "method's name is same to an existing method in a trait",
+                                        "method's name is the same as an existing method in a trait",
                                         |diag| {
                                             diag.span_note(
                                                 trait_method_span,
@@ -139,7 +139,7 @@ impl<'tcx> LateLintPass<'tcx> for SameNameMethod {
                                         cx,
                                         SAME_NAME_METHOD,
                                         impl_span,
-                                        "method's name is same to an existing method in a trait",
+                                        "method's name is the same as an existing method in a trait",
                                         |diag| {
                                             // TODO should we `span_note` on every trait?
                                             // iterate on trait_spans?
diff --git a/tests/ui/same_name_method.stderr b/tests/ui/same_name_method.stderr
index 0f9139b41b9..c32c3dd9880 100644
--- a/tests/ui/same_name_method.stderr
+++ b/tests/ui/same_name_method.stderr
@@ -1,4 +1,4 @@
-error: method's name is same to an existing method in a trait
+error: method's name is the same as an existing method in a trait
   --> $DIR/same_name_method.rs:20:13
    |
 LL |             fn foo() {}
@@ -11,7 +11,7 @@ note: existing `foo` defined here
 LL |             fn foo() {}
    |             ^^^^^^^^^^^
 
-error: method's name is same to an existing method in a trait
+error: method's name is the same as an existing method in a trait
   --> $DIR/same_name_method.rs:44:13
    |
 LL |             fn foo() {}
@@ -23,7 +23,7 @@ note: existing `foo` defined here
 LL |             fn foo() {}
    |             ^^^^^^^^^^^
 
-error: method's name is same to an existing method in a trait
+error: method's name is the same as an existing method in a trait
   --> $DIR/same_name_method.rs:58:13
    |
 LL |             fn foo() {}
@@ -35,7 +35,7 @@ note: existing `foo` defined here
 LL |         impl T1 for S {}
    |         ^^^^^^^^^^^^^^^^
 
-error: method's name is same to an existing method in a trait
+error: method's name is the same as an existing method in a trait
   --> $DIR/same_name_method.rs:70:13
    |
 LL |             fn foo() {}
@@ -47,7 +47,7 @@ note: existing `foo` defined here
 LL |         impl T1 for S {}
    |         ^^^^^^^^^^^^^^^^
 
-error: method's name is same to an existing method in a trait
+error: method's name is the same as an existing method in a trait
   --> $DIR/same_name_method.rs:34:13
    |
 LL |             fn clone() {}