]> git.lizzy.rs Git - rust.git/blob - tests/source/fn-simple.rs
Merge pull request #487 from marcusklaas/konsts-n-statix
[rust.git] / tests / source / fn-simple.rs
1
2 fn simple(/*pre-comment on a function!?*/ i: i32/*yes, it's possible!  */   
3                                         ,response: NoWay /* hose */) {"cool"}
4
5
6 fn weird_comment(/* /*/ double level */ comment */ x: Hello /*/*/* tripple, even */*/*/,
7 // Does this work?
8 y: World
9 ) {
10         simple(/* does this preserve comments now? */ 42, NoWay)
11 }
12
13 fn generic<T>(arg: T) -> &SomeType
14     where T: Fn(// First arg
15         A,
16         // Second argument
17         B, C, D, /* pre comment */ E /* last comment */) -> &SomeType {
18     arg(a, b, c, d, e)    
19 }
20
21 fn foo()  ->  !  {}
22
23 pub fn http_fetch_async(listener:Box< AsyncCORSResponseListener+Send >,  script_chan:  Box<ScriptChan+Send>) {
24 }
25
26 fn some_func<T:Box<Trait+Bound>>(val:T){}
27
28 fn zzzzzzzzzzzzzzzzzzzz<Type, NodeType>
29                        (selff: Type, mut handle: node::Handle<IdRef<'id, Node<K, V>>, Type, NodeType>)
30                         -> SearchStack<'a, K, V, Type, NodeType>{
31 }