fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.6 KiB47 linesraw
1error[E0061]: this function takes 0 parameters but 1 parameter was supplied
2  --> $DIR/method-call-err-msg.rs:12:7
3   |
4LL |     fn zero(self) -> Foo { self }
5   |     -------------------- defined here
6...
7LL |     x.zero(0)
8   |       ^^^^ expected 0 parameters
9
10error[E0061]: this function takes 1 parameter but 0 parameters were supplied
11  --> $DIR/method-call-err-msg.rs:13:7
12   |
13LL |     fn one(self, _: isize) -> Foo { self }
14   |     ----------------------------- defined here
15...
16LL |      .one()
17   |       ^^^ expected 1 parameter
18
19error[E0061]: this function takes 2 parameters but 1 parameter was supplied
20  --> $DIR/method-call-err-msg.rs:14:7
21   |
22LL |     fn two(self, _: isize, _: isize) -> Foo { self }
23   |     --------------------------------------- defined here
24...
25LL |      .two(0);
26   |       ^^^ expected 2 parameters
27
28error[E0599]: no method named `take` found for type `Foo` in the current scope
29  --> $DIR/method-call-err-msg.rs:18:7
30   |
31LL | pub struct Foo;
32   | --------------- method `take` not found for this
33...
34LL |      .take()
35   |       ^^^^ method not found in `Foo`
36   |
37   = note: the method `take` exists but the following trait bounds were not satisfied:
38           `&mut Foo : std::iter::Iterator`
39   = help: items from traits can only be used if the trait is implemented and in scope
40   = note: the following traits define an item `take`, perhaps you need to implement one of them:
41           candidate #1: `std::io::Read`
42           candidate #2: `std::iter::Iterator`
43
44error: aborting due to 4 previous errors
45
46Some errors have detailed explanations: E0061, E0599.
47For more information about an error, try `rustc --explain E0061`.