]> git.lizzy.rs Git - rust.git/blob - tests/target/fn.rs
Merge pull request #84 from marcusklaas/tests
[rust.git] / tests / target / fn.rs
1 // Tests different fns
2
3 fn foo(a: AAAA, b: BBB, c: CCC) -> RetType {
4
5 }
6
7 fn foo(a: AAAA, b: BBB, c: CCC) -> RetType
8     where T: Blah
9 {
10
11 }
12
13 fn foo(a: AAA)
14     where T: Blah
15 {
16
17 }
18
19 fn foo(a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
20        b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)
21        -> RetType
22     where T: Blah
23 {
24
25 }
26
27
28 fn foo<U, T>(a: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
29              b: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)
30              -> RetType
31     where T: Blah,
32           U: dsfasdfasdfasd
33 {
34
35 }
36
37 impl Foo {
38     fn with_no_errors<T, F>(&mut self, f: F) -> T
39         where F: FnOnce(&mut Resolver) -> T
40     {
41     }
42
43     fn foo(mut self, mut bar: u32) {
44     }
45
46     fn bar(self, mut bazz: u32) {
47     }
48 }
49
50 pub fn render<'a,
51               N: Clone + 'a,
52               E: Clone + 'a,
53               G: Labeller<'a, N, E> + GraphWalk<'a, N, E>,
54               W: Write>
55     (g: &'a G,
56      w: &mut W)
57      -> io::Result<()> {
58     render_opts(g, w, &[])
59 }
60
61 const fn foo() {
62     x;
63 }
64
65 pub const fn foo() {
66     x;
67 }
68
69 impl Foo {
70     const fn foo() {
71         x;
72     }
73 }
74
75 fn main() {
76     let _ = function(move || 5);
77     let _ = move || 42;
78 }