mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
60 lines
1.8 KiB
Plaintext
60 lines
1.8 KiB
Plaintext
error: at least one trait must be specified
|
|
--> $DIR/issue-78720.rs:1:16
|
|
|
|
|
LL | fn server() -> impl {
|
|
| ^^^^
|
|
|
|
error[E0412]: cannot find type `F` in this scope
|
|
--> $DIR/issue-78720.rs:14:12
|
|
|
|
|
LL | _func: F,
|
|
| ^
|
|
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
|
|
|
|
= note: similarly named trait `Fn` defined here
|
|
|
|
|
help: a trait with a similar name exists
|
|
|
|
|
LL | _func: Fn,
|
|
| ~~
|
|
help: you might be missing a type parameter
|
|
|
|
|
LL | struct Map2<Segment2, F> {
|
|
| +++
|
|
|
|
error[E0282]: type annotations needed
|
|
--> $DIR/issue-78720.rs:1:16
|
|
|
|
|
LL | fn server() -> impl {
|
|
| ^^^^ cannot infer type
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/issue-78720.rs:8:39
|
|
|
|
|
LL | fn map2<F>(self, f: F) -> Map2<F> {}
|
|
| ^^ expected `Map2<F>`, found `()`
|
|
|
|
|
= note: expected struct `Map2<F>`
|
|
found unit type `()`
|
|
|
|
error[E0277]: the size for values of type `Self` cannot be known at compilation time
|
|
--> $DIR/issue-78720.rs:8:16
|
|
|
|
|
LL | fn map2<F>(self, f: F) -> Map2<F> {}
|
|
| ^^^^ doesn't have a size known at compile-time
|
|
|
|
|
= help: unsized fn params are gated as an unstable feature
|
|
help: consider further restricting `Self`
|
|
|
|
|
LL | fn map2<F>(self, f: F) -> Map2<F> where Self: Sized {}
|
|
| +++++++++++++++++
|
|
help: function arguments must have a statically known size, borrowed types always have a known size
|
|
|
|
|
LL | fn map2<F>(&self, f: F) -> Map2<F> {}
|
|
| +
|
|
|
|
error: aborting due to 5 previous errors
|
|
|
|
Some errors have detailed explanations: E0277, E0282, E0308, E0412.
|
|
For more information about an error, try `rustc --explain E0277`.
|