]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/method-call-err-msg.stderr
Rollup merge of #98665 - ChrisDenton:deprecated-suggestion, 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 LL | |     /// The type of the elements being iterated over.
69 LL | |     #[stable(feature = "rust1", since = "1.0.0")]
70 LL | |     type Item;
71 ...  |
72 LL | |     }
73 LL | | }
74    | |_^
75    = help: items from traits can only be used if the trait is implemented and in scope
76    = note: the following trait defines an item `take`, perhaps you need to implement it:
77            candidate #1: `Iterator`
78
79 error[E0061]: this function takes 3 arguments but 0 arguments were supplied
80   --> $DIR/method-call-err-msg.rs:21:7
81    |
82 LL |     y.three::<usize>();
83    |       ^^^^^^^^^^^^^^-- three arguments of type `usize`, `usize`, and `usize` are missing
84    |
85 note: associated function defined here
86   --> $DIR/method-call-err-msg.rs:8:8
87    |
88 LL |     fn three<T>(self, _: T, _: T, _: T) -> Foo { self }
89    |        ^^^^^    ----  ----  ----  ----
90 help: provide the arguments
91    |
92 LL |     y.three::<usize>(/* usize */, /* usize */, /* usize */);
93    |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94
95 error: aborting due to 5 previous errors
96
97 Some errors have detailed explanations: E0061, E0599.
98 For more information about an error, try `rustc --explain E0061`.