]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/method-call-err-msg.stderr
Give method not found a primary span label
[rust.git] / src / test / ui / methods / method-call-err-msg.stderr
1 error[E0061]: this function takes 0 parameters but 1 parameter was supplied
2   --> $DIR/method-call-err-msg.rs:12:7
3    |
4 LL |     fn zero(self) -> Foo { self }
5    |     -------------------- defined here
6 ...
7 LL |     x.zero(0)
8    |       ^^^^ expected 0 parameters
9
10 error[E0061]: this function takes 1 parameter but 0 parameters were supplied
11   --> $DIR/method-call-err-msg.rs:13:7
12    |
13 LL |     fn one(self, _: isize) -> Foo { self }
14    |     ----------------------------- defined here
15 ...
16 LL |      .one()
17    |       ^^^ expected 1 parameter
18
19 error[E0061]: this function takes 2 parameters but 1 parameter was supplied
20   --> $DIR/method-call-err-msg.rs:14:7
21    |
22 LL |     fn two(self, _: isize, _: isize) -> Foo { self }
23    |     --------------------------------------- defined here
24 ...
25 LL |      .two(0);
26    |       ^^^ expected 2 parameters
27
28 error[E0599]: no method named `take` found for type `Foo` in the current scope
29   --> $DIR/method-call-err-msg.rs:18:7
30    |
31 LL | pub struct Foo;
32    | --------------- method `take` not found for this
33 ...
34 LL |      .take()
35    |       ^^^^ method not found in `Foo`
36    |
37    = note: the method `take` exists but the following trait bounds were not satisfied:
38            `&mut Foo : std::iter::Iterator`
39    = help: items from traits can only be used if the trait is implemented and in scope
40    = note: the following traits define an item `take`, perhaps you need to implement one of them:
41            candidate #1: `std::io::Read`
42            candidate #2: `std::iter::Iterator`
43
44 error: aborting due to 4 previous errors
45
46 Some errors have detailed explanations: E0061, E0599.
47 For more information about an error, try `rustc --explain E0061`.