]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | // run-pass |
0bf4aa26 | 2 | #![allow(dead_code)] |
c34b1796 AL |
3 | // pretty-expanded FIXME #23616 |
4 | ||
1a4d82fc JJ |
5 | #![feature(box_syntax)] |
6 | ||
970d7e83 | 7 | pub trait EventLoop { |
85aaf69f | 8 | fn dummy(&self) { } |
970d7e83 LB |
9 | } |
10 | ||
11 | pub struct UvEventLoop { | |
c34b1796 | 12 | uvio: isize |
970d7e83 LB |
13 | } |
14 | ||
15 | impl UvEventLoop { | |
16 | pub fn new() -> UvEventLoop { | |
17 | UvEventLoop { | |
18 | uvio: 0 | |
19 | } | |
20 | } | |
21 | } | |
22 | ||
23 | impl EventLoop for UvEventLoop { | |
24 | } | |
25 | ||
26 | pub struct Scheduler { | |
dc9dc135 | 27 | event_loop: Box<dyn EventLoop+'static>, |
970d7e83 LB |
28 | } |
29 | ||
30 | impl Scheduler { | |
31 | ||
dc9dc135 | 32 | pub fn new(event_loop: Box<dyn EventLoop+'static>) -> Scheduler { |
970d7e83 LB |
33 | Scheduler { |
34 | event_loop: event_loop, | |
35 | } | |
36 | } | |
223e47cc LB |
37 | } |
38 | ||
1a4d82fc | 39 | pub fn main() { |
dc9dc135 | 40 | let _sched = Scheduler::new(box UvEventLoop::new() as Box<dyn EventLoop>); |
223e47cc | 41 | } |