about summary refs log tree commit diff
path: root/src/test/ui/methods
diff options
context:
space:
mode:
authorIlija Tovilo <ilija.tovilo@me.com>2019-07-24 02:25:01 +0200
committerIlija Tovilo <ilija.tovilo@me.com>2019-07-24 03:03:52 +0200
commitbe510dbc35960c9d90f42811787eea2acef8ffe5 (patch)
tree425f461f9720997088ccf80e3727c94ea7ef61c2 /src/test/ui/methods
parentbd8813e52c5120c40ec3cca096ff4a98fdf56be8 (diff)
Adjust tests for method disambiguation help
Diffstat (limited to 'src/test/ui/methods')
-rw-r--r--src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr2
-rw-r--r--src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr2
-rw-r--r--src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr
index 2b87ddfdf98..9f46a722a50 100644
--- a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr
+++ b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr
@@ -9,7 +9,9 @@ note: candidate #1 is defined in an impl of the trait `Me2` for the type `usize`
    |
 LL | impl Me2 for usize { fn me(&self) -> usize { *self } }
    |                      ^^^^^^^^^^^^^^^^^^^^^
+   = help: to disambiguate the method call, write `Me2::me(1_usize)` instead
    = note: candidate #2 is defined in an impl of the trait `ambig_impl_2_lib::Me` for the type `usize`
+   = help: to disambiguate the method call, write `ambig_impl_2_lib::Me::me(1_usize)` instead
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr b/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr
index 5d508d57022..dc8aef25037 100644
--- a/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr
+++ b/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr
@@ -9,11 +9,13 @@ note: candidate #1 is defined in an impl of the trait `Foo` for the type `usize`
    |
 LL | trait Foo { fn method(&self) {} }
    |             ^^^^^^^^^^^^^^^^
+   = help: to disambiguate the method call, write `Foo::method(1_usize)` instead
 note: candidate #2 is defined in an impl of the trait `Bar` for the type `usize`
   --> $DIR/method-ambig-two-traits-with-default-method.rs:6:13
    |
 LL | trait Bar { fn method(&self) {} }
    |             ^^^^^^^^^^^^^^^^
+   = help: to disambiguate the method call, write `Bar::method(1_usize)` instead
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
index d6fac7025a4..283ef8fcba7 100644
--- a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
+++ b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
@@ -27,11 +27,13 @@ note: candidate #1 is defined in an impl of the trait `internal::X` for the type
    |
 LL |         fn foo(self: Smaht<Self, u64>) -> u64 {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = help: to disambiguate the method call, write `internal::X::foo(x)` instead
 note: candidate #2 is defined in an impl of the trait `nuisance_foo::NuisanceFoo` for the type `_`
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:70:9
    |
 LL |         fn foo(self) {}
    |         ^^^^^^^^^^^^
+   = help: to disambiguate the method call, write `nuisance_foo::NuisanceFoo::foo(x)` instead
 note: candidate #3 is defined in the trait `FinalFoo`
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:57:5
    |