@@ -5,7 +5,7 @@ LL | fn server() -> impl {
5
5
| ^^^^
6
6
7
7
error[E0412]: cannot find type `F` in this scope
8
- --> $DIR/issue-78720.rs:13 :12
8
+ --> $DIR/issue-78720.rs:14 :12
9
9
|
10
10
LL | _func: F,
11
11
| ^
@@ -22,8 +22,14 @@ help: you might be missing a type parameter
22
22
LL | struct Map2<Segment2, F> {
23
23
| +++
24
24
25
+ error[E0282]: type annotations needed
26
+ --> $DIR/issue-78720.rs:3:5
27
+ |
28
+ LL | ().map2(|| "")
29
+ | ^^^^^^^^^^^^^^ cannot infer type
30
+
25
31
error[E0308]: mismatched types
26
- --> $DIR/issue-78720.rs:7 :39
32
+ --> $DIR/issue-78720.rs:8 :39
27
33
|
28
34
LL | fn map2<F>(self, f: F) -> Map2<F> {}
29
35
| ^^ expected `Map2<F>`, found `()`
@@ -32,7 +38,7 @@ LL | fn map2<F>(self, f: F) -> Map2<F> {}
32
38
found unit type `()`
33
39
34
40
error[E0277]: the size for values of type `Self` cannot be known at compilation time
35
- --> $DIR/issue-78720.rs:7 :16
41
+ --> $DIR/issue-78720.rs:8 :16
36
42
|
37
43
LL | fn map2<F>(self, f: F) -> Map2<F> {}
38
44
| ^^^^ doesn't have a size known at compile-time
@@ -47,7 +53,7 @@ help: function arguments must have a statically known size, borrowed types alway
47
53
LL | fn map2<F>(&self, f: F) -> Map2<F> {}
48
54
| +
49
55
50
- error: aborting due to 4 previous errors
56
+ error: aborting due to 5 previous errors
51
57
52
- Some errors have detailed explanations: E0277, E0308, E0412.
58
+ Some errors have detailed explanations: E0277, E0282, E0308, E0412.
53
59
For more information about an error, try `rustc --explain E0277`.
0 commit comments