rust/src/test/ui/method-call-err-msg.stderr

46 lines
1.8 KiB
Plaintext
Raw Normal View History

2017-10-08 20:13:37 -05:00
error[E0061]: this function takes 0 parameters but 1 parameter was supplied
--> $DIR/method-call-err-msg.rs:22:7
2017-10-08 20:13:37 -05:00
|
15 | fn zero(self) -> Foo { self }
| -------------------- defined here
2017-10-08 20:13:37 -05:00
...
22 | x.zero(0) //~ ERROR this function takes 0 parameters but 1 parameter was supplied
| ^^^^ expected 0 parameters
2017-10-08 20:13:37 -05:00
error[E0061]: this function takes 1 parameter but 0 parameters were supplied
--> $DIR/method-call-err-msg.rs:23:7
2017-10-08 20:13:37 -05:00
|
16 | fn one(self, _: isize) -> Foo { self }
| ----------------------------- defined here
2017-10-08 20:13:37 -05:00
...
23 | .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
--> $DIR/method-call-err-msg.rs:24:7
2017-10-08 20:13:37 -05:00
|
17 | fn two(self, _: isize, _: isize) -> Foo { self }
| --------------------------------------- defined here
2017-10-08 20:13:37 -05:00
...
24 | .two(0); //~ ERROR this function takes 2 parameters but 1 parameter was supplied
| ^^^ 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
--> $DIR/method-call-err-msg.rs:28:7
2017-10-08 20:13:37 -05:00
|
13 | pub struct Foo;
| --------------- method `take` not found for this
...
28 | .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:
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