]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/methods/method-call-err-msg.stderr
Do not suggest implementing traits if present in predicates
[rust.git] / src / test / ui / methods / method-call-err-msg.stderr
index ab1ef5b9d5aed6980f3c7f27fa94906c08119fc8..4678642dd6d0cb9bfff87afa1879d6af72ae7b3d 100644 (file)
@@ -35,17 +35,20 @@ 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
+   | doesn't satisfy `Foo: 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`
+           `Foo: std::iter::Iterator`
+           which is required by `&mut 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`
-           candidate #2: `std::iter::Iterator`
+   = note: the following trait defines an item `take`, perhaps you need to implement it:
+           candidate #1: `std::iter::Iterator`
 
 error[E0061]: this function takes 3 arguments but 0 arguments were supplied
   --> $DIR/method-call-err-msg.rs:21:7