]>
Commit | Line | Data |
---|---|---|
85aaf69f SL |
1 | // Various unsuccessful attempts to put the unboxed closure kind |
2 | // inference into an awkward position that might require fixed point | |
3 | // iteration (basically where inferring the kind of a closure `c` | |
4 | // would require knowing the kind of `c`). I currently believe this is | |
5 | // impossible. | |
6 | ||
7 | fn a() { | |
8 | let mut closure0 = None; | |
923072b8 | 9 | //~^ ERROR type annotations needed |
c30ab7b3 | 10 | let vec = vec![1, 2, 3]; |
85aaf69f SL |
11 | |
12 | loop { | |
13 | { | |
14 | let closure1 = || { | |
15 | match closure0.take() { | |
16 | Some(c) => { | |
17 | return c(); | |
85aaf69f SL |
18 | } |
19 | None => { } | |
20 | } | |
21 | }; | |
22 | closure1(); | |
23 | } | |
24 | ||
25 | closure0 = || vec; | |
26 | } | |
27 | } | |
28 | ||
29 | fn main() { } |