]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/in-trait/method-signature-matches.stderr
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / impl-trait / in-trait / method-signature-matches.stderr
1 error[E0053]: method `owo` has an incompatible type for trait
2   --> $DIR/method-signature-matches.rs:11:15
3    |
4 LL |     fn owo(_: u8) {}
5    |               ^^
6    |               |
7    |               expected `()`, found `u8`
8    |               help: change the parameter type to match the trait: `()`
9    |
10 note: type in trait
11   --> $DIR/method-signature-matches.rs:7:15
12    |
13 LL |     fn owo(x: ()) -> impl Sized;
14    |               ^^
15    = note: expected fn pointer `fn(())`
16               found fn pointer `fn(u8)`
17
18 error[E0053]: method `owo` has an incompatible type for trait
19   --> $DIR/method-signature-matches.rs:20:21
20    |
21 LL |     async fn owo(_: u8) {}
22    |                     ^^
23    |                     |
24    |                     expected `()`, found `u8`
25    |                     help: change the parameter type to match the trait: `()`
26    |
27 note: while checking the return type of the `async fn`
28   --> $DIR/method-signature-matches.rs:20:25
29    |
30 LL |     async fn owo(_: u8) {}
31    |                         ^ checked the `Output` of this `async fn`, expected opaque type
32 note: while checking the return type of the `async fn`
33   --> $DIR/method-signature-matches.rs:20:25
34    |
35 LL |     async fn owo(_: u8) {}
36    |                         ^ checked the `Output` of this `async fn`, found opaque type
37 note: type in trait
38   --> $DIR/method-signature-matches.rs:16:21
39    |
40 LL |     async fn owo(x: ()) {}
41    |                     ^^
42    = note: expected fn pointer `fn(()) -> _`
43               found fn pointer `fn(u8) -> _`
44
45 error[E0050]: method `calm_down_please` has 3 parameters but the declaration in trait `TooMuch::calm_down_please` has 0
46   --> $DIR/method-signature-matches.rs:29:28
47    |
48 LL |     fn calm_down_please() -> impl Sized;
49    |     ------------------------------------ trait requires 0 parameters
50 ...
51 LL |     fn calm_down_please(_: (), _: (), _: ()) {}
52    |                            ^^^^^^^^^^^^^^^^ expected 0 parameters, found 3
53
54 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
55   --> $DIR/method-signature-matches.rs:38:5
56    |
57 LL |     fn come_on_a_little_more_effort(_: (), _: (), _: ()) -> impl Sized;
58    |                                        ---------------- trait requires 3 parameters
59 ...
60 LL |     fn come_on_a_little_more_effort() {}
61    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 parameters, found 0
62
63 error[E0053]: method `early` has an incompatible type for trait
64   --> $DIR/method-signature-matches.rs:47:27
65    |
66 LL |     fn early<'late, T>(_: &'late ()) {}
67    |                     -     ^^^^^^^^^
68    |                     |     |
69    |                     |     expected type parameter `T`, found `()`
70    |                     |     help: change the parameter type to match the trait: `&'early T`
71    |                     this type parameter
72    |
73 note: type in trait
74   --> $DIR/method-signature-matches.rs:43:28
75    |
76 LL |     fn early<'early, T>(x: &'early T) -> impl Sized;
77    |                            ^^^^^^^^^
78    = note: expected fn pointer `fn(&'early T)`
79               found fn pointer `fn(&())`
80
81 error: aborting due to 5 previous errors
82
83 Some errors have detailed explanations: E0050, E0053.
84 For more information about an error, try `rustc --explain E0050`.