diff options
Diffstat (limited to 'tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs')
-rw-r--r-- | tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs b/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs new file mode 100644 index 000000000..c496a3556 --- /dev/null +++ b/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs @@ -0,0 +1,14 @@ +// build-pass +// compile-flags: --edition 2018 +// compile-flags: --crate-type rlib + +use std::future::Future; + +async fn handle<F>(slf: &F) +where + F: Fn(&()) -> Box<dyn for<'a> Future<Output = ()> + Unpin>, +{ + (slf)(&()).await; +} + +fn main() {} |