]> git.lizzy.rs Git - rust.git/blob - tests/target/comments-fn.rs
Merge pull request #3500 from rchaser53/issue-3499
[rust.git] / tests / target / comments-fn.rs
1 // Test comments on functions are preserved.
2
3 // Comment on foo.
4 fn foo<F, G>(
5     a: aaaaaaaaaaaaa, // A comment
6     b: bbbbbbbbbbbbb, // a second comment
7     c: ccccccccccccc,
8     // Newline comment
9     d: ddddddddddddd,
10     //  A multi line comment
11     // between args.
12     e: eeeeeeeeeeeee, /* comment before paren */
13 ) -> bar
14 where
15     F: Foo, // COmment after where-clause
16     G: Goo, // final comment
17 {
18
19 }
20
21 fn bar<F /* comment on F */, G /* comment on G */>() {}
22
23 fn baz() -> Baz /* Comment after return type */ {}
24
25 fn some_fn<T>()
26 where
27     T: Eq, // some comment
28 {
29 }
30
31 fn issue458<F>(a: &str, f: F)
32 // comment1
33 where
34     // comment2
35     F: FnOnce(&str) -> bool,
36 {
37     f(a);
38     ()
39 }