]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/method-call-err-msg.stderr
Rollup merge of #100559 - nnethercote:parser-simplifications, r=compiler-errors
[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 |     x.zero(0)
5    |       ^^^^ - argument of type `{integer}` unexpected
6    |
7 note: associated function defined here
8   --> $DIR/method-call-err-msg.rs:5:8
9    |
10 LL |     fn zero(self) -> Foo { self }
11    |        ^^^^
12 help: remove the extra argument
13    |
14 LL |     x.zero()
15    |       ~~~~~~
16
17 error[E0061]: this function takes 1 argument but 0 arguments were supplied
18   --> $DIR/method-call-err-msg.rs:14:7
19    |
20 LL |      .one()
21    |       ^^^-- an argument of type `isize` is missing
22    |
23 note: associated function defined here
24   --> $DIR/method-call-err-msg.rs:6:8
25    |
26 LL |     fn one(self, _: isize) -> Foo { self }
27    |        ^^^       --------
28 help: provide the argument
29    |
30 LL |      .one(/* isize */)
31    |       ~~~~~~~~~~~~~~~~
32
33 error[E0061]: this function takes 2 arguments but 1 argument was supplied
34   --> $DIR/method-call-err-msg.rs:15:7
35    |
36 LL |      .two(0);
37    |       ^^^--- an argument of type `isize` is missing
38    |
39 note: associated function defined here
40   --> $DIR/method-call-err-msg.rs:7:8
41    |
42 LL |     fn two(self, _: isize, _: isize) -> Foo { self }
43    |        ^^^       --------  --------
44 help: provide the argument
45    |
46 LL |      .two(0, /* isize */);
47    |       ~~~~~~~~~~~~~~~~~~~
48
49 error[E0599]: `Foo` is not an iterator
50   --> $DIR/method-call-err-msg.rs:19:7
51    |
52 LL | pub struct Foo;
53    | --------------
54    | |
55    | method `take` not found for this struct
56    | doesn't satisfy `Foo: Iterator`
57 ...
58 LL |      .take()
59    |       ^^^^ `Foo` is not an iterator
60    |
61    = note: the following trait bounds were not satisfied:
62            `Foo: Iterator`
63            which is required by `&mut Foo: Iterator`
64 note: the following trait must be implemented
65   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
66    |
67 LL | pub trait Iterator {
68    | ^^^^^^^^^^^^^^^^^^
69    = help: items from traits can only be used if the trait is implemented and in scope
70    = note: the following trait defines an item `take`, perhaps you need to implement it:
71            candidate #1: `Iterator`
72
73 error[E0061]: this function takes 3 arguments but 0 arguments were supplied
74   --> $DIR/method-call-err-msg.rs:21:7
75    |
76 LL |     y.three::<usize>();
77    |       ^^^^^^^^^^^^^^-- three arguments of type `usize`, `usize`, and `usize` are missing
78    |
79 note: associated function defined here
80   --> $DIR/method-call-err-msg.rs:8:8
81    |
82 LL |     fn three<T>(self, _: T, _: T, _: T) -> Foo { self }
83    |        ^^^^^          ----  ----  ----
84 help: provide the arguments
85    |
86 LL |     y.three::<usize>(/* usize */, /* usize */, /* usize */);
87    |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88
89 error: aborting due to 5 previous errors
90
91 Some errors have detailed explanations: E0061, E0599.
92 For more information about an error, try `rustc --explain E0061`.