2018-08-30 12:18:55 +00:00
|
|
|
// run-pass
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 20:13:15 +00:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2013-06-27 23:53:40 +00:00
|
|
|
pub trait EventLoop {
|
2015-02-12 15:29:52 +00:00
|
|
|
fn dummy(&self) { }
|
2013-06-27 23:53:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pub struct UvEventLoop {
|
2015-03-26 00:06:52 +00:00
|
|
|
uvio: isize
|
2013-06-27 23:53:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl UvEventLoop {
|
|
|
|
pub fn new() -> UvEventLoop {
|
|
|
|
UvEventLoop {
|
|
|
|
uvio: 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl EventLoop for UvEventLoop {
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Scheduler {
|
2019-05-28 18:47:21 +00:00
|
|
|
event_loop: Box<dyn EventLoop+'static>,
|
2013-06-27 23:53:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Scheduler {
|
|
|
|
|
2019-05-28 18:47:21 +00:00
|
|
|
pub fn new(event_loop: Box<dyn EventLoop+'static>) -> Scheduler {
|
2013-06-27 23:53:40 +00:00
|
|
|
Scheduler {
|
|
|
|
event_loop: event_loop,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-25 07:43:37 +00:00
|
|
|
pub fn main() {
|
2022-07-07 02:36:10 +00:00
|
|
|
let _sched = Scheduler::new(Box::new(UvEventLoop::new()) as Box<dyn EventLoop>);
|
2013-06-27 23:53:40 +00:00
|
|
|
}
|