summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/method-signature-matches.stderr
blob: 3ec62020e6c89c41077a681f599a9856cc2cb05a (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
error[E0053]: method `owo` has an incompatible type for trait
  --> $DIR/method-signature-matches.rs:11:15
   |
LL |     fn owo(_: u8) {}
   |               ^^
   |               |
   |               expected `()`, found `u8`
   |               help: change the parameter type to match the trait: `()`
   |
note: type in trait
  --> $DIR/method-signature-matches.rs:7:15
   |
LL |     fn owo(x: ()) -> impl Sized;
   |               ^^
   = note: expected signature `fn(())`
              found signature `fn(u8)`

error[E0053]: method `owo` has an incompatible type for trait
  --> $DIR/method-signature-matches.rs:20:21
   |
LL |     async fn owo(_: u8) {}
   |                     ^^
   |                     |
   |                     expected `()`, found `u8`
   |                     help: change the parameter type to match the trait: `()`
   |
note: type in trait
  --> $DIR/method-signature-matches.rs:16:21
   |
LL |     async fn owo(x: ()) {}
   |                     ^^
   = note: expected signature `fn(()) -> _`
              found signature `fn(u8) -> _`

error[E0050]: method `calm_down_please` has 3 parameters but the declaration in trait `TooMuch::calm_down_please` has 0
  --> $DIR/method-signature-matches.rs:29:28
   |
LL |     fn calm_down_please() -> impl Sized;
   |     ------------------------------------ trait requires 0 parameters
...
LL |     fn calm_down_please(_: (), _: (), _: ()) {}
   |                            ^^^^^^^^^^^^^^^^ expected 0 parameters, found 3

error[E0050]: method `come_on_a_little_more_effort` has 0 parameters but the declaration in trait `TooLittle::come_on_a_little_more_effort` has 3
  --> $DIR/method-signature-matches.rs:38:5
   |
LL |     fn come_on_a_little_more_effort(_: (), _: (), _: ()) -> impl Sized;
   |                                        ---------------- trait requires 3 parameters
...
LL |     fn come_on_a_little_more_effort() {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 parameters, found 0

error[E0053]: method `early` has an incompatible type for trait
  --> $DIR/method-signature-matches.rs:47:27
   |
LL |     fn early<'late, T>(_: &'late ()) {}
   |                     -     ^^^^^^^^^
   |                     |     |
   |                     |     expected type parameter `T`, found `()`
   |                     |     help: change the parameter type to match the trait: `&'early T`
   |                     this type parameter
   |
note: type in trait
  --> $DIR/method-signature-matches.rs:43:28
   |
LL |     fn early<'early, T>(x: &'early T) -> impl Sized;
   |                            ^^^^^^^^^
   = note: expected signature `fn(&'early T)`
              found signature `fn(&())`

error: aborting due to 5 previous errors

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