summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/issue-83737-binders-across-types.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lifetimes/issue-83737-binders-across-types.rs')
-rw-r--r--src/test/ui/lifetimes/issue-83737-binders-across-types.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/issue-83737-binders-across-types.rs b/src/test/ui/lifetimes/issue-83737-binders-across-types.rs
new file mode 100644
index 000000000..e130561e4
--- /dev/null
+++ b/src/test/ui/lifetimes/issue-83737-binders-across-types.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 Future<Output = ()> + Unpin>,
+{
+ (slf)(&()).await;
+}
+
+fn main() {}