• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // rustfmt-normalize_comments: true
2 
simple( i: i32 ,response: NoWay )3 fn simple(/*pre-comment on a function!?*/ i: i32/*yes, it's possible!  */
4                                         ,response: NoWay /* hose */) {
5 fn op(x: Typ, key : &[u8], upd : Box<Fn(Option<&memcache::Item>) -> (memcache::Status, Result<memcache::Item, Option<String>>)>) -> MapResult {}
6 
7         "cool"}
8 
9 
weird_comment( x: Hello , y: World )10 fn weird_comment(/* /*/ double level */ comment */ x: Hello /*/*/* triple, even */*/*/,
11 // Does this work?
12 y: World
13 ) {
14         simple(/* does this preserve comments now? */ 42, NoWay)
15 }
16 
generic<T>(arg: T) -> &SomeType where T: Fn( A, B, C, D, E ) -> &SomeType17 fn generic<T>(arg: T) -> &SomeType
18     where T: Fn(// First arg
19         A,
20         // Second argument
21         B, C, D, /* pre comment */ E /* last comment */) -> &SomeType {
22     arg(a, b, c, d, e)
23 }
24 
foo() -> !25 fn foo()  ->  !  {}
26 
http_fetch_async(listener:Box< AsyncCORSResponseListener+Send >, script_chan: Box<ScriptChan+Send>)27 pub fn http_fetch_async(listener:Box< AsyncCORSResponseListener+Send >,  script_chan:  Box<ScriptChan+Send>) {
28 }
29 
some_func<T:Box<Trait+Bound>>(val:T)30 fn some_func<T:Box<Trait+Bound>>(val:T){}
31 
zzzzzzzzzzzzzzzzzzzz<Type, NodeType> (selff: Type, mut handle: node::Handle<IdRef<'id, Node<K, V>>, Type, NodeType>) -> SearchStack<'a, K, V, Type, NodeType>32 fn zzzzzzzzzzzzzzzzzzzz<Type, NodeType>
33                        (selff: Type, mut handle: node::Handle<IdRef<'id, Node<K, V>>, Type, NodeType>)
34                         -> SearchStack<'a, K, V, Type, NodeType>{
35 }
36 
generic_call(cx: *mut JSContext, argc: libc::c_uint, vp: *mut JSVal, is_lenient: bool, call: unsafe extern fn(*const JSJitInfo, *mut JSContext, HandleObject, *mut libc::c_void, u32, *mut JSVal) -> u8)37 unsafe fn generic_call(cx: *mut JSContext, argc: libc::c_uint, vp: *mut JSVal,
38     is_lenient: bool,
39                        call: unsafe extern fn(*const JSJitInfo, *mut JSContext,
40                                               HandleObject, *mut libc::c_void, u32,
41                                               *mut JSVal)
42                                               -> u8) {
43     let f:  fn  ( _ , _  ) ->  _   =  panic!()  ;
44 }
45 
start_export_thread<C: CryptoSchemee + 'static>(database: &Database, crypto_scheme: &C, block_size: usize, source_path: &Path) -> BonzoResult<mpsc::Consumer<'static, FileInstruction>>46 pub fn start_export_thread<C: CryptoSchemee + 'static>(database: &Database, crypto_scheme: &C, block_size: usize, source_path: &Path) -> BonzoResult<mpsc::Consumer<'static, FileInstruction>> {}
47 
waltz(cwd: &Path) -> CliAssert48 pub fn waltz(cwd: &Path) -> CliAssert {
49     {
50         {
51             formatted_comment = rewrite_comment(comment, block_style, width, offset, formatting_fig);
52         }
53     }
54 }
55 
56 // #2003
57 mod foo {
__bindgen_test_layout_i_open0_c_open1_char_a_open2_char_close2_close1_close0_instantiation()58     fn __bindgen_test_layout_i_open0_c_open1_char_a_open2_char_close2_close1_close0_instantiation() {
59         foo();
60     }
61 }
62 
63 // #2082
init()64 pub(crate) fn init() {}
65 
init()66 pub(crate) fn init() {}
67 
68 // #2630
make_map<T, F: (Fn(&T) -> String)>(records: &Vec<T>, key_fn: F) -> HashMap<String, usize>69 fn make_map<T, F: (Fn(&T) -> String)>(records: &Vec<T>, key_fn: F) -> HashMap<String, usize> {}
70 
71 // #2956
bar(beans: Asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf, spam: bool, eggs: bool) -> bool72 fn bar(beans: Asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf, spam: bool, eggs: bool) -> bool{
73     unimplemented!();
74 }
75