diff options
Diffstat (limited to 'tests/ui/async-await/multiple-lifetimes/fn-ptr.rs')
-rw-r--r-- | tests/ui/async-await/multiple-lifetimes/fn-ptr.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs b/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs new file mode 100644 index 000000000..3912b8547 --- /dev/null +++ b/tests/ui/async-await/multiple-lifetimes/fn-ptr.rs @@ -0,0 +1,12 @@ +// edition:2018 +// run-pass + +// Test that we can use async fns with multiple arbitrary lifetimes. + +async fn multiple_named_lifetimes<'a, 'b>(_: &'a u8, _: &'b u8, _: fn(&u8)) {} + +fn gimme(_: &u8) { } + +fn main() { + let _ = multiple_named_lifetimes(&22, &44, gimme); +} |