]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-5192.rs
Rollup merge of #107124 - DebugSteven:check-macro-expansion, r=albertlarsan68
[rust.git] / tests / ui / issues / issue-5192.rs
1 // run-pass
2 #![allow(dead_code)]
3 // pretty-expanded FIXME #23616
4
5 pub trait EventLoop {
6     fn dummy(&self) { }
7 }
8
9 pub struct UvEventLoop {
10     uvio: isize
11 }
12
13 impl UvEventLoop {
14     pub fn new() -> UvEventLoop {
15         UvEventLoop {
16             uvio: 0
17         }
18     }
19 }
20
21 impl EventLoop for UvEventLoop {
22 }
23
24 pub struct Scheduler {
25     event_loop: Box<dyn EventLoop+'static>,
26 }
27
28 impl Scheduler {
29
30     pub fn new(event_loop: Box<dyn EventLoop+'static>) -> Scheduler {
31         Scheduler {
32             event_loop: event_loop,
33         }
34     }
35 }
36
37 pub fn main() {
38     let _sched = Scheduler::new(Box::new(UvEventLoop::new()) as Box<dyn EventLoop>);
39 }