2017-10-08 20:13:37 -05:00
|
|
|
error[E0061]: this function takes 0 parameters but 1 parameter was supplied
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/method-call-err-msg.rs:12: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
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | x.zero(0) //~ ERROR this function takes 0 parameters but 1 parameter was supplied
|
2017-12-10 13:12:17 -06:00
|
|
|
| ^^^^ expected 0 parameters
|
2017-10-08 20:13:37 -05:00
|
|
|
|
|
|
|
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $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 one(self, _: isize) -> Foo { self }
|
2017-12-10 13:12:17 -06:00
|
|
|
| ----------------------------- defined here
|
2017-10-08 20:13:37 -05:00
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | .one() //~ ERROR this function takes 1 parameter but 0 parameters were supplied
|
2017-10-08 20:13:37 -05:00
|
|
|
| ^^^ expected 1 parameter
|
|
|
|
|
|
|
|
error[E0061]: this function takes 2 parameters but 1 parameter was supplied
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $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 two(self, _: isize, _: isize) -> Foo { self }
|
2017-12-10 13:12:17 -06:00
|
|
|
| --------------------------------------- defined here
|
2017-10-08 20:13:37 -05:00
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | .two(0); //~ ERROR this function takes 2 parameters but 1 parameter was supplied
|
2017-12-10 13:12:17 -06:00
|
|
|
| ^^^ expected 2 parameters
|
2017-10-08 20:13:37 -05:00
|
|
|
|
|
|
|
error[E0599]: no method named `take` found for type `Foo` in the current scope
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/method-call-err-msg.rs:18:7
|
2017-10-08 20:13:37 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | pub struct Foo;
|
2017-11-16 00:18:52 -06:00
|
|
|
| --------------- method `take` not found for this
|
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | .take() //~ ERROR no method named `take` found for type `Foo` in the current scope
|
2017-10-08 20:13:37 -05:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= note: the method `take` exists but the following trait bounds were not satisfied:
|
|
|
|
`&mut Foo : std::iter::Iterator`
|
|
|
|
= help: items from traits can only be used if the trait is implemented and in scope
|
|
|
|
= note: the following traits define an item `take`, perhaps you need to implement one of them:
|
2018-01-17 22:15:13 -06:00
|
|
|
candidate #1: `std::io::Read`
|
|
|
|
candidate #2: `std::iter::Iterator`
|
2017-10-08 20:13:37 -05:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
Some errors occurred: E0061, E0599.
|
|
|
|
For more information about an error, try `rustc --explain E0061`.
|