fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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