]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-5192.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-5192.rs
CommitLineData
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 7pub trait EventLoop {
85aaf69f 8 fn dummy(&self) { }
970d7e83
LB
9}
10
11pub struct UvEventLoop {
c34b1796 12 uvio: isize
970d7e83
LB
13}
14
15impl UvEventLoop {
16 pub fn new() -> UvEventLoop {
17 UvEventLoop {
18 uvio: 0
19 }
20 }
21}
22
23impl EventLoop for UvEventLoop {
24}
25
26pub struct Scheduler {
dc9dc135 27 event_loop: Box<dyn EventLoop+'static>,
970d7e83
LB
28}
29
30impl 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 39pub fn main() {
dc9dc135 40 let _sched = Scheduler::new(box UvEventLoop::new() as Box<dyn EventLoop>);
223e47cc 41}