summaryrefslogtreecommitdiffstats
path: root/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/lifetimes/issue-76168-hr-outlives-3.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs b/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs
new file mode 100644
index 000000000..b0b6b318d
--- /dev/null
+++ b/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs
@@ -0,0 +1,19 @@
+// edition:2018
+
+#![feature(unboxed_closures)]
+use std::future::Future;
+
+async fn wrapper<F>(f: F)
+//~^ ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+//~| ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+//~| ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+where
+ F:,
+ for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
+{
+ //~^ ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+ let mut i = 41;
+ &mut i;
+}
+
+fn main() {}