about summary refs log tree commit diff
path: root/src/test/ui/methods
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2020-02-17 23:22:19 -0800
committerEsteban Küber <esteban@kuber.com.ar>2020-02-28 11:37:58 -0800
commitf037d5ca1bf42108520a1fd3b07c5cec46bc94da (patch)
treefc41848ba2c8e5ff0ad08f77e41bc226cbfc1362 /src/test/ui/methods
parenteaa02f599f651246d5d1b99e7a4c6fa8d04bc9dc (diff)
Add more context to E0599 errors
Point at the intermediary unfullfilled trait bounds.
Diffstat (limited to 'src/test/ui/methods')
-rw-r--r--src/test/ui/methods/method-call-err-msg.stderr8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/ui/methods/method-call-err-msg.stderr b/src/test/ui/methods/method-call-err-msg.stderr
index ab1ef5b9d5a..0c48e93347d 100644
--- a/src/test/ui/methods/method-call-err-msg.stderr
+++ b/src/test/ui/methods/method-call-err-msg.stderr
@@ -35,13 +35,17 @@ error[E0599]: no method named `take` found for struct `Foo` in the current scope
   --> $DIR/method-call-err-msg.rs:19:7
    |
 LL | pub struct Foo;
-   | --------------- method `take` not found for this
+   | ---------------
+   | |
+   | method `take` not found for this
+   | this type doesn't satisfy the bound `std::iter::Iterator`
 ...
 LL |      .take()
    |       ^^^^ method not found in `Foo`
    |
    = note: the method `take` exists but the following trait bounds were not satisfied:
-           `&mut Foo : std::iter::Iterator`
+           `&mut Foo: std::iter::Iterator`
+           `Foo: std::iter::Iterator`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `take`, perhaps you need to implement one of them:
            candidate #1: `std::io::Read`