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