about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/ui/same_name_method.rs1
-rw-r--r--tests/ui/same_name_method.stderr16
2 files changed, 15 insertions, 2 deletions
diff --git a/tests/ui/same_name_method.rs b/tests/ui/same_name_method.rs
index 1c166a19b0a..26b1a299ba1 100644
--- a/tests/ui/same_name_method.rs
+++ b/tests/ui/same_name_method.rs
@@ -74,6 +74,7 @@ mod should_lint {
         impl S {
             fn foo() {}
             //~^ ERROR: method's name is the same as an existing method in a trait
+            //~| ERROR: method's name is the same as an existing method in a trait
         }
 
         impl T1 for S {}
diff --git a/tests/ui/same_name_method.stderr b/tests/ui/same_name_method.stderr
index 3c5c4a53ad1..82f5ef6a9e8 100644
--- a/tests/ui/same_name_method.stderr
+++ b/tests/ui/same_name_method.stderr
@@ -56,10 +56,22 @@ LL |             fn foo() {}
    |             ^^^^^^^^^^^
    |
 note: existing `foo` defined here
-  --> $DIR/same_name_method.rs:79:9
+  --> $DIR/same_name_method.rs:80:9
    |
 LL |         impl T1 for S {}
    |         ^^^^^^^^^^^^^^^^
 
-error: aborting due to 5 previous errors
+error: method's name is the same as an existing method in a trait
+  --> $DIR/same_name_method.rs:75:13
+   |
+LL |             fn foo() {}
+   |             ^^^^^^^^^^^
+   |
+note: existing `foo` defined here
+  --> $DIR/same_name_method.rs:82:9
+   |
+LL |         impl T2 for S {}
+   |         ^^^^^^^^^^^^^^^^
+
+error: aborting due to 6 previous errors