2015-04-28 03:56:01 -05:00
|
|
|
// Test comments on functions are preserved.
|
|
|
|
|
|
|
|
// Comment on foo.
|
2017-06-11 23:01:41 -05:00
|
|
|
fn foo<F, G>(
|
|
|
|
a: aaaaaaaaaaaaa, // A comment
|
|
|
|
b: bbbbbbbbbbbbb, // a second comment
|
|
|
|
c: ccccccccccccc,
|
|
|
|
// Newline comment
|
|
|
|
d: ddddddddddddd,
|
|
|
|
// A multi line comment
|
|
|
|
// between args.
|
|
|
|
e: eeeeeeeeeeeee, /* comment before paren */
|
|
|
|
) -> bar
|
|
|
|
where
|
2019-02-18 20:56:42 -06:00
|
|
|
F: Foo, // COmment after where-clause
|
2017-06-11 23:01:41 -05:00
|
|
|
G: Goo, // final comment
|
2015-04-28 03:56:01 -05:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-11-19 20:11:32 -06:00
|
|
|
fn bar<F /* comment on F */, G /* comment on G */>() {}
|
2015-04-28 03:56:01 -05:00
|
|
|
|
2015-11-19 20:11:32 -06:00
|
|
|
fn baz() -> Baz /* Comment after return type */ {}
|
2017-06-09 02:15:31 -05:00
|
|
|
|
2017-06-11 23:01:41 -05:00
|
|
|
fn some_fn<T>()
|
|
|
|
where
|
|
|
|
T: Eq, // some comment
|
2017-06-09 02:15:31 -05:00
|
|
|
{
|
|
|
|
}
|
2017-07-10 00:35:50 -05:00
|
|
|
|
|
|
|
fn issue458<F>(a: &str, f: F)
|
|
|
|
// comment1
|
|
|
|
where
|
|
|
|
// comment2
|
|
|
|
F: FnOnce(&str) -> bool,
|
|
|
|
{
|
|
|
|
f(a);
|
|
|
|
()
|
|
|
|
}
|