|
1 | 1 | use crate::application::ApplicationHandler; |
2 | 2 | use crate::error::EventLoopError; |
3 | | -use crate::event_loop::EventLoop; |
4 | 3 | #[cfg(doc)] |
5 | 4 | use crate::{ |
6 | 5 | event_loop::{pump_events::EventLoopExtPumpEvents, ActiveEventLoop}, |
7 | 6 | window::Window, |
8 | 7 | }; |
9 | 8 |
|
| 9 | +#[allow(rustdoc::broken_intra_doc_links)] // FIXME(madsmtm): Fix these. |
10 | 10 | /// Additional methods on [`EventLoop`] to return control flow to the caller. |
11 | 11 | pub trait EventLoopExtRunOnDemand { |
12 | 12 | /// Run the application with the event loop on the calling thread. |
@@ -63,22 +63,3 @@ pub trait EventLoopExtRunOnDemand { |
63 | 63 | /// [`set_control_flow()`]: ActiveEventLoop::set_control_flow() |
64 | 64 | fn run_app_on_demand<A: ApplicationHandler>(&mut self, app: A) -> Result<(), EventLoopError>; |
65 | 65 | } |
66 | | - |
67 | | -impl EventLoopExtRunOnDemand for EventLoop { |
68 | | - fn run_app_on_demand<A: ApplicationHandler>(&mut self, app: A) -> Result<(), EventLoopError> { |
69 | | - self.event_loop.run_app_on_demand(app) |
70 | | - } |
71 | | -} |
72 | | - |
73 | | -/// ```compile_fail |
74 | | -/// use winit::event_loop::EventLoop; |
75 | | -/// use winit::platform::run_on_demand::EventLoopExtRunOnDemand; |
76 | | -/// |
77 | | -/// let mut event_loop = EventLoop::new().unwrap(); |
78 | | -/// event_loop.run_on_demand(|_, _| { |
79 | | -/// // Attempt to run the event loop re-entrantly; this must fail. |
80 | | -/// event_loop.run_on_demand(|_, _| {}); |
81 | | -/// }); |
82 | | -/// ``` |
83 | | -#[allow(dead_code)] |
84 | | -fn test_run_on_demand_cannot_access_event_loop() {} |
0 commit comments