]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-5192.rs
Auto merge of #95380 - compiler-errors:unit-destructure-assign, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-5192.rs
1 // run-pass
2 #![allow(dead_code)]
3 // pretty-expanded FIXME #23616
4
5 #![feature(box_syntax)]
6
7 pub trait EventLoop {
8     fn dummy(&self) { }
9 }
10
11 pub struct UvEventLoop {
12     uvio: isize
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 {
27     event_loop: Box<dyn EventLoop+'static>,
28 }
29
30 impl Scheduler {
31
32     pub fn new(event_loop: Box<dyn EventLoop+'static>) -> Scheduler {
33         Scheduler {
34             event_loop: event_loop,
35         }
36     }
37 }
38
39 pub fn main() {
40     let _sched = Scheduler::new(box UvEventLoop::new() as Box<dyn EventLoop>);
41 }