@@ -5,7 +5,7 @@ LL | / async fn wrapper<F>(f: F)
55LL | |
66LL | |
77LL | |
8- LL | | where
8+ ... |
99LL | | F:,
1010LL | | for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
1111 | |__________________________________________________________________________^ expected an `FnOnce(&'a mut i32)` closure, found `i32`
@@ -27,15 +27,30 @@ LL | / async fn wrapper<F>(f: F)
2727LL | |
2828LL | |
2929LL | |
30- LL | | where
30+ ... |
3131LL | | F:,
3232LL | | for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
3333 | |__________________________________________________________________________^ expected an `FnOnce(&'a mut i32)` closure, found `i32`
3434 |
3535 = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
3636
3737error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32`
38- --> $DIR/issue-76168-hr-outlives-3.rs:13:1
38+ --> $DIR/issue-76168-hr-outlives-3.rs:6:1
39+ |
40+ LL | / async fn wrapper<F>(f: F)
41+ LL | |
42+ LL | |
43+ LL | |
44+ ... |
45+ LL | | F:,
46+ LL | | for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
47+ | |__________________________________________________________________________^ expected an `FnOnce(&'a mut i32)` closure, found `i32`
48+ |
49+ = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
50+ = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
51+
52+ error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32`
53+ --> $DIR/issue-76168-hr-outlives-3.rs:14:1
3954 |
4055LL | / {
4156LL | |
@@ -46,6 +61,6 @@ LL | | }
4661 |
4762 = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
4863
49- error: aborting due to 4 previous errors
64+ error: aborting due to 5 previous errors
5065
5166For more information about this error, try `rustc --explain E0277`.
0 commit comments