]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/issues/issue-74282.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / impl-trait / issues / issue-74282.stderr
CommitLineData
5e7ed085
FG
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(|| {
923072b8
FG
8 | _____---------_^
9 | | |
10 | | arguments to this struct are incorrect
5e7ed085
FG
11LL | | 3
12LL | | })
13 | |_____^ expected closure, found a different closure
14 |
15 = note: expected opaque type `Closure`
064997fb 16 found closure `[closure@$DIR/issue-74282.rs:8:15: 8:17]`
5e7ed085
FG
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
923072b8
FG
19note: tuple struct defined here
20 --> $DIR/issue-74282.rs:4:8
21 |
22LL | struct Anonymous(Closure);
23 | ^^^^^^^^^
5e7ed085
FG
24
25error[E0308]: mismatched types
26 --> $DIR/issue-74282.rs:8:5
27 |
28LL | fn main() {
29 | - expected `()` because of default return type
30LL | let y = || -> Closure { || 3 };
31LL | / Anonymous(|| {
32LL | | 3
33LL | | })
34 | | ^- help: consider using a semicolon here: `;`
35 | |______|
36 | expected `()`, found struct `Anonymous`
37
38error: aborting due to 2 previous errors
39
40For more information about this error, try `rustc --explain E0308`.