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