]> git.lizzy.rs Git - rust.git/blob - tests/target/fn-simple.rs
Merge pull request #314 from alobb/configDocumentation
[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
34 pub fn http_fetch_async(listener: Box<AsyncCORSResponseListener + Send>,
35                         script_chan: Box<ScriptChan + Send>) {
36 }
37
38 fn some_func<T: Box<Trait + Bound>>(val: T) {
39 }