1 error[E0308]: mismatched types
2 --> $DIR/issue-74282.rs:8:15
4 LL | type Closure = impl Fn() -> u64;
5 | ---------------- the expected opaque type
10 | | arguments to this struct are incorrect
13 | |_____^ expected closure, found a different closure
15 = note: expected opaque type `Closure`
16 found closure `[closure@$DIR/issue-74282.rs:8:15: 8:17]`
17 = note: no two closures, even if identical, have the same type
18 = help: consider boxing your closure and/or using it as a trait object
19 note: tuple struct defined here
20 --> $DIR/issue-74282.rs:4:8
22 LL | struct Anonymous(Closure);
25 error[E0308]: mismatched types
26 --> $DIR/issue-74282.rs:8:5
29 | - expected `()` because of default return type
30 LL | let y = || -> Closure { || 3 };
34 | | ^- help: consider using a semicolon here: `;`
36 | expected `()`, found struct `Anonymous`
38 error: aborting due to 2 previous errors
40 For more information about this error, try `rustc --explain E0308`.