]> git.lizzy.rs Git - rust.git/blob - tests/ui/methods/method-call-err-msg.stderr
Rollup merge of #107125 - WaffleLapkin:expect_an_item_in_your_hir_by_the_next_morning...
[rust.git] / tests / ui / methods / method-call-err-msg.stderr
1 error[E0061]: this method 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 method 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 method 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 trait `Iterator` must be implemented
65   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
66    = help: items from traits can only be used if the trait is implemented and in scope
67    = note: the following trait defines an item `take`, perhaps you need to implement it:
68            candidate #1: `Iterator`
69
70 error[E0061]: this method takes 3 arguments but 0 arguments were supplied
71   --> $DIR/method-call-err-msg.rs:21:7
72    |
73 LL |     y.three::<usize>();
74    |       ^^^^^^^^^^^^^^-- three arguments of type `usize`, `usize`, and `usize` are missing
75    |
76 note: associated function defined here
77   --> $DIR/method-call-err-msg.rs:8:8
78    |
79 LL |     fn three<T>(self, _: T, _: T, _: T) -> Foo { self }
80    |        ^^^^^          ----  ----  ----
81 help: provide the arguments
82    |
83 LL |     y.three::<usize>(/* usize */, /* usize */, /* usize */);
84    |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85
86 error: aborting due to 5 previous errors
87
88 Some errors have detailed explanations: E0061, E0599.
89 For more information about an error, try `rustc --explain E0061`.