2020-02-05 23:08:07 -06:00
|
|
|
error[E0061]: this function takes 0 arguments but 1 argument was supplied
|
|
|
|
--> $DIR/method-call-err-msg.rs:13:7
|
2017-10-08 20:13:37 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | fn zero(self) -> Foo { self }
|
2017-12-10 13:12:17 -06:00
|
|
|
| -------------------- defined here
|
2017-10-08 20:13:37 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | x.zero(0)
|
2020-02-05 23:08:07 -06:00
|
|
|
| ^^^^ - supplied 1 argument
|
|
|
|
| |
|
|
|
|
| expected 0 arguments
|
2017-10-08 20:13:37 -05:00
|
|
|
|
2020-02-05 23:08:07 -06:00
|
|
|
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
|
|
|
--> $DIR/method-call-err-msg.rs:14:7
|
2017-10-08 20:13:37 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | fn one(self, _: isize) -> Foo { self }
|
2017-12-10 13:12:17 -06:00
|
|
|
| ----------------------------- defined here
|
2017-10-08 20:13:37 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | .one()
|
2020-02-05 23:08:07 -06:00
|
|
|
| ^^^- supplied 0 arguments
|
|
|
|
| |
|
|
|
|
| expected 1 argument
|
2017-10-08 20:13:37 -05:00
|
|
|
|
2020-02-05 23:08:07 -06:00
|
|
|
error[E0061]: this function takes 2 arguments but 1 argument was supplied
|
|
|
|
--> $DIR/method-call-err-msg.rs:15:7
|
2017-10-08 20:13:37 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | fn two(self, _: isize, _: isize) -> Foo { self }
|
2017-12-10 13:12:17 -06:00
|
|
|
| --------------------------------------- defined here
|
2017-10-08 20:13:37 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | .two(0);
|
2020-02-05 23:08:07 -06:00
|
|
|
| ^^^ - supplied 1 argument
|
|
|
|
| |
|
|
|
|
| expected 2 arguments
|
2017-10-08 20:13:37 -05:00
|
|
|
|
2020-01-08 10:05:31 -06:00
|
|
|
error[E0599]: no method named `take` found for struct `Foo` in the current scope
|
2020-02-05 23:08:07 -06:00
|
|
|
--> $DIR/method-call-err-msg.rs:19:7
|
2017-10-08 20:13:37 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | pub struct Foo;
|
2020-02-18 01:22:19 -06:00
|
|
|
| ---------------
|
|
|
|
| |
|
|
|
|
| method `take` not found for this
|
2020-09-02 02:40:56 -05:00
|
|
|
| doesn't satisfy `Foo: Iterator`
|
2017-11-16 00:18:52 -06:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | .take()
|
2019-09-06 14:00:07 -05:00
|
|
|
| ^^^^ method not found in `Foo`
|
2017-10-08 20:13:37 -05:00
|
|
|
|
|
2020-02-18 18:35:47 -06:00
|
|
|
= note: the method `take` exists but the following trait bounds were not satisfied:
|
2020-09-02 02:40:56 -05:00
|
|
|
`Foo: Iterator`
|
|
|
|
which is required by `&mut Foo: Iterator`
|
2017-10-08 20:13:37 -05:00
|
|
|
= help: items from traits can only be used if the trait is implemented and in scope
|
2020-02-25 14:10:48 -06:00
|
|
|
= note: the following trait defines an item `take`, perhaps you need to implement it:
|
2020-09-02 02:40:56 -05:00
|
|
|
candidate #1: `Iterator`
|
2017-10-08 20:13:37 -05:00
|
|
|
|
2020-02-05 23:08:07 -06:00
|
|
|
error[E0061]: this function takes 3 arguments but 0 arguments were supplied
|
|
|
|
--> $DIR/method-call-err-msg.rs:21:7
|
|
|
|
|
|
|
|
|
LL | fn three<T>(self, _: T, _: T, _: T) -> Foo { self }
|
|
|
|
| ------------------------------------------ defined here
|
|
|
|
...
|
|
|
|
LL | y.three::<usize>();
|
|
|
|
| ^^^^^--------- supplied 0 arguments
|
|
|
|
| |
|
|
|
|
| expected 3 arguments
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2017-10-08 20:13:37 -05:00
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0061, E0599.
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about an error, try `rustc --explain E0061`.
|