45 lines
1.9 KiB
Plaintext
45 lines
1.9 KiB
Plaintext
|
error[E0061]: this function takes 0 parameters but 1 parameter was supplied
|
||
|
--> $DIR/method-call-err-msg.rs:25:12
|
||
|
|
|
||
|
15 | fn zero(self) -> Foo { self }
|
||
|
| ----------------------------- defined here
|
||
|
...
|
||
|
25 | x.zero(0) //~ ERROR this function takes 0 parameters but 1 parameter was supplied
|
||
|
| ^ expected 0 parameters
|
||
|
|
||
|
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
|
||
|
--> $DIR/method-call-err-msg.rs:27:7
|
||
|
|
|
||
|
17 | fn one(self, _: isize) -> Foo { self }
|
||
|
| -------------------------------------- defined here
|
||
|
...
|
||
|
27 | .one() //~ ERROR this function takes 1 parameter but 0 parameters were supplied
|
||
|
| ^^^ expected 1 parameter
|
||
|
|
||
|
error[E0061]: this function takes 2 parameters but 1 parameter was supplied
|
||
|
--> $DIR/method-call-err-msg.rs:29:11
|
||
|
|
|
||
|
19 | fn two(self, _: isize, _: isize) -> Foo { self }
|
||
|
| ------------------------------------------------ defined here
|
||
|
...
|
||
|
29 | .two(0); //~ ERROR this function takes 2 parameters but 1 parameter was supplied
|
||
|
| ^ expected 2 parameters
|
||
|
|
||
|
error[E0599]: no method named `take` found for type `Foo` in the current scope
|
||
|
--> $DIR/method-call-err-msg.rs:34:7
|
||
|
|
|
||
|
34 | .take() //~ ERROR no method named `take` found for type `Foo` in the current scope
|
||
|
| ^^^^
|
||
|
|
|
||
|
= 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:
|
||
|
candidate #1: `std::collections::hash::Recover`
|
||
|
candidate #2: `std::io::Read`
|
||
|
candidate #3: `std::iter::Iterator`
|
||
|
candidate #4: `alloc::btree::Recover`
|
||
|
|
||
|
error: aborting due to 4 previous errors
|
||
|
|