#5301·miri

`priroda` can't compile `backtrace` on windows: `expected "C" fn, found "system" fn`

Author: mejrsCreated Sep 2, 2026Updated Sep 5, 2026
LabelsC-bugA-priroda

I tried:

python x.py check, which eventually does python x.py check priroda:

Result:

error[E0308]: mismatched types                                                                                                                                                                                                                                                                         
   --> C:\Users\bruno\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.76\src\dbghelp.rs:87:76
    |
 35 | / macro_rules! dbghelp {
 36 | |     (extern "system" {
 37 | |         $(fn $name:ident($($arg:ident: $argty:ty),*) -> $ret: ty;)*
 38 | |     }) => (
...   |
 87 | |                         let _: unsafe extern "C" fn($($argty),*) -> $ret = super::windows_sys::$name;
    | |                                -----------------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^ expected "C" fn, found "system" fn
    | |                                |
    | |                                expected due to this
...   |
126 | | }
    | |_- in this expansion of `dbghelp!`
127 |
128 | / dbghelp! {
129 | |     extern "system" {
130 | |         fn SymGetOptions() -> u32;
131 | |         fn SymSetOptions(options: u32) -> u32;
...   |
223 | | }
    | |_- in this macro invocation
    |
    = note: expected fn pointer `unsafe extern "C" fn() -> _`
                  found fn item `unsafe extern "system" fn() -> _ {windows_sys::SymGetOptions}`

(repeated for every declaration in that extern block)