1 error: at least one trait must be specified
2 --> $DIR/issue-78720.rs:1:16
4 LL | fn server() -> impl {
7 error[E0412]: cannot find type `F` in this scope
8 --> $DIR/issue-78720.rs:13:12
12 --> $SRC_DIR/core/src/ops/function.rs:LL:COL
14 = note: similarly named trait `Fn` defined here
16 help: a trait with a similar name exists
20 help: you might be missing a type parameter
22 LL | struct Map2<Segment2, F> {
25 error[E0308]: mismatched types
26 --> $DIR/issue-78720.rs:7:39
28 LL | fn map2<F>(self, f: F) -> Map2<F> {}
29 | ^^ expected `Map2<F>`, found `()`
31 = note: expected struct `Map2<F>`
34 error[E0277]: the size for values of type `Self` cannot be known at compilation time
35 --> $DIR/issue-78720.rs:7:16
37 LL | fn map2<F>(self, f: F) -> Map2<F> {}
38 | ^^^^ doesn't have a size known at compile-time
40 = help: unsized fn params are gated as an unstable feature
41 help: consider further restricting `Self`
43 LL | fn map2<F>(self, f: F) -> Map2<F> where Self: Sized {}
45 help: function arguments must have a statically known size, borrowed types always have a known size
47 LL | fn map2<F>(&self, f: F) -> Map2<F> {}
50 error: aborting due to 4 previous errors
52 Some errors have detailed explanations: E0277, E0308, E0412.
53 For more information about an error, try `rustc --explain E0277`.