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