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