fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: mismatched types 2 --> $DIR/issue-74282.rs:8:15 3 | 4LL | type Closure = impl Fn() -> u64; 5 | ---------------- the expected opaque type 6... 7LL | Anonymous(|| { 8 | _____---------_^ 9 | | | 10 | | arguments to this struct are incorrect 11LL | | 12LL | | 3 13LL | | }) 14 | |_____^ expected opaque type, found closure 15 | 16 = note: expected opaque type `Closure` 17 found closure `{closure@$DIR/issue-74282.rs:8:15: 8:17}` 18 = note: no two closures, even if identical, have the same type 19 = help: consider boxing your closure and/or using it as a trait object 20note: tuple struct defined here 21 --> $DIR/issue-74282.rs:4:8 22 | 23LL | struct Anonymous(Closure); 24 | ^^^^^^^^^ 25 26error[E0308]: mismatched types 27 --> $DIR/issue-74282.rs:8:5 28 | 29LL | / Anonymous(|| { 30LL | | 31LL | | 3 32LL | | }) 33 | |______^ expected `()`, found `Anonymous` 34 | 35help: consider using a semicolon here 36 | 37LL | }); 38 | + 39help: try adding a return type 40 | 41LL | fn bop(_: Closure) -> Anonymous { 42 | ++++++++++++ 43 44error: aborting due to 2 previous errors 45 46For more information about this error, try `rustc --explain E0308`.