File: function_noreturn.rs

package info (click to toggle)
rust-cbindgen 0.27.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,616 kB
  • sloc: ansic: 15; makefile: 11
file content (14 lines) | stat: -rw-r--r-- 254 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[no_mangle]
pub extern "C" fn loop_forever() -> ! {
    loop {}
}

#[no_mangle]
pub extern "C" fn normal_return(arg: Example, other: extern "C" fn(u8) -> !) -> u8 {
    0
}

#[repr(C)]
pub struct Example {
    pub f: extern "C" fn(usize, usize) -> !,
}