about summary refs log tree commit diff
path: root/src/test/ui/methods/method-call-err-msg.stderr
blob: c1183e053eb43095a58050f9b37cbefbeb7fce67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
error[E0061]: this function takes 0 arguments but 1 argument was supplied
  --> $DIR/method-call-err-msg.rs:13:7
   |
LL |     x.zero(0)
   |       ^^^^ - supplied 1 argument
   |       |
   |       expected 0 arguments
   |
note: associated function defined here
  --> $DIR/method-call-err-msg.rs:5:8
   |
LL |     fn zero(self) -> Foo { self }
   |        ^^^^ ----

error[E0061]: this function takes 1 argument but 0 arguments were supplied
  --> $DIR/method-call-err-msg.rs:14:7
   |
LL |      .one()
   |       ^^^- supplied 0 arguments
   |       |
   |       expected 1 argument
   |
note: associated function defined here
  --> $DIR/method-call-err-msg.rs:6:8
   |
LL |     fn one(self, _: isize) -> Foo { self }
   |        ^^^ ----  --------

error[E0061]: this function takes 2 arguments but 1 argument was supplied
  --> $DIR/method-call-err-msg.rs:15:7
   |
LL |      .two(0);
   |       ^^^ - supplied 1 argument
   |       |
   |       expected 2 arguments
   |
note: associated function defined here
  --> $DIR/method-call-err-msg.rs:7:8
   |
LL |     fn two(self, _: isize, _: isize) -> Foo { self }
   |        ^^^ ----  --------  --------

error[E0599]: the method `take` exists for struct `Foo`, but its trait bounds were not satisfied
  --> $DIR/method-call-err-msg.rs:19:7
   |
LL | pub struct Foo;
   | ---------------
   | |
   | method `take` not found for this
   | doesn't satisfy `Foo: Iterator`
...
LL |      .take()
   |       ^^^^ method cannot be called on `Foo` due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `Foo: Iterator`
           which is required by `&mut Foo: Iterator`
note: the following trait must be implemented
  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
   |
LL | / pub trait Iterator {
LL | |     /// The type of the elements being iterated over.
LL | |     #[stable(feature = "rust1", since = "1.0.0")]
LL | |     type Item;
...  |
LL | |     }
LL | | }
   | |_^
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following trait defines an item `take`, perhaps you need to implement it:
           candidate #1: `Iterator`

error[E0061]: this function takes 3 arguments but 0 arguments were supplied
  --> $DIR/method-call-err-msg.rs:21:7
   |
LL |     y.three::<usize>();
   |       ^^^^^--------- supplied 0 arguments
   |       |
   |       expected 3 arguments
   |
note: associated function defined here
  --> $DIR/method-call-err-msg.rs:8:8
   |
LL |     fn three<T>(self, _: T, _: T, _: T) -> Foo { self }
   |        ^^^^^    ----  ----  ----  ----

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0061, E0599.
For more information about an error, try `rustc --explain E0061`.