This static is registered as a global constructor for Windows binaries:
|
static INIT_MAIN_THREAD_ID: unsafe fn() = { |
That means the function will be invoked by the Windows runtime, so it must have the "C" ABI. The code currently uses the "Rust" ABI, which happens to be the same for fn(), but that's not guaranteed.
(Found by Miri)
This static is registered as a global constructor for Windows binaries:
winit/winit-win32/src/event_loop.rs
Line 531 in de78ffd
That means the function will be invoked by the Windows runtime, so it must have the "C" ABI. The code currently uses the "Rust" ABI, which happens to be the same for
fn(), but that's not guaranteed.(Found by Miri)