]> git.lizzy.rs Git - rust.git/blob - tests/target/extern.rs
c0601a4d0e1c3e01a862f2f5e1a8f39e1f3420a3
[rust.git] / tests / target / extern.rs
1 // rustfmt-normalize_comments: true
2
3 extern crate foo as bar;
4 extern crate foo;
5
6 extern crate chrono;
7 extern crate dotenv;
8 extern crate futures;
9
10 extern crate bar;
11 extern crate foo;
12
13 extern "C" {
14     fn c_func(x: *mut *mut libc::c_void);
15
16     fn c_func(
17         x: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,
18         y: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY,
19     );
20
21     #[test123]
22     fn foo() -> uint64_t;
23
24     pub fn bar();
25 }
26
27 extern "C" {
28     fn DMR_GetDevice(
29         pHDev: *mut HDEV,
30         searchMode: DeviceSearchMode,
31         pSearchString: *const c_char,
32         devNr: c_uint,
33         wildcard: c_char,
34     ) -> TDMR_ERROR;
35
36     fn quux() -> (); // Post comment
37 }
38
39 extern "Rust" {
40     static ext: u32;
41     // Some comment.
42     pub static mut var: SomeType;
43 }
44
45 extern "C" {
46     fn syscall(
47         number: libc::c_long, // comment 1
48         // comm 2
49         ... // sup?
50     ) -> libc::c_long;
51
52     fn foo(x: *const c_char, ...) -> libc::c_long;
53 }
54
55 extern "C" {
56     pub fn freopen(
57         filename: *const c_char,
58         mode: *const c_char,
59         mode2: *const c_char,
60         mode3: *const c_char,
61         file: *mut FILE,
62     ) -> *mut FILE;
63 }
64
65 extern "C" {}