@@ -5,7 +5,7 @@ LL | fn server() -> impl {
55 | ^^^^
66
77error[E0412]: cannot find type `F` in this scope
8- --> $DIR/issue-78720.rs:13 :12
8+ --> $DIR/issue-78720.rs:14 :12
99 |
1010LL | _func: F,
1111 | ^
@@ -22,8 +22,14 @@ help: you might be missing a type parameter
2222LL | struct Map2<Segment2, F> {
2323 | +++
2424
25+ error[E0282]: type annotations needed
26+ --> $DIR/issue-78720.rs:3:5
27+ |
28+ LL | ().map2(|| "")
29+ | ^^^^^^^^^^^^^^ cannot infer type
30+
2531error[E0308]: mismatched types
26- --> $DIR/issue-78720.rs:7 :39
32+ --> $DIR/issue-78720.rs:8 :39
2733 |
2834LL | fn map2<F>(self, f: F) -> Map2<F> {}
2935 | ^^ expected `Map2<F>`, found `()`
@@ -32,7 +38,7 @@ LL | fn map2<F>(self, f: F) -> Map2<F> {}
3238 found unit type `()`
3339
3440error[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
3642 |
3743LL | fn map2<F>(self, f: F) -> Map2<F> {}
3844 | ^^^^ 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
4753LL | fn map2<F>(&self, f: F) -> Map2<F> {}
4854 | +
4955
50- error: aborting due to 4 previous errors
56+ error: aborting due to 5 previous errors
5157
52- Some errors have detailed explanations: E0277, E0308, E0412.
58+ Some errors have detailed explanations: E0277, E0282, E0308, E0412.
5359For more information about an error, try `rustc --explain E0277`.
0 commit comments