1
Fork 0
rust/src/test/ui/issues/issue-5192.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
664 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
// pretty-expanded FIXME #23616
#![feature(box_syntax)]
pub trait EventLoop {
fn dummy(&self) { }
}
pub struct UvEventLoop {
uvio: isize
}
impl UvEventLoop {
pub fn new() -> UvEventLoop {
UvEventLoop {
uvio: 0
}
}
}
impl EventLoop for UvEventLoop {
}
pub struct Scheduler {
2019-05-28 14:47:21 -04:00
event_loop: Box<dyn EventLoop+'static>,
}
impl Scheduler {
2019-05-28 14:47:21 -04:00
pub fn new(event_loop: Box<dyn EventLoop+'static>) -> Scheduler {
Scheduler {
event_loop: event_loop,
}
}
}
pub fn main() {
2019-05-28 14:47:21 -04:00
let _sched = Scheduler::new(box UvEventLoop::new() as Box<dyn EventLoop>);
}